PDA

View Full Version : web.config help


mrswoop
06-Feb-2007, 01:36 PM
Greetings ~

I use BC extensively for folder & file compare on gross "package" differences... absolutely love it. However, I am experiencing some frustration trying to use it to assist with comparison of web.config files (on asp.net). By way of explanation (for those not familiar with the platform), a web.config file is basically an XML file. The problem I am having is that, despite any changes I make, I don't seem to be able to get BC to ignore crlf & whitespace? So where in one file an XML node spans lines and in the other it is consolidated on one line (eg. below):

a) <globalization culture="en-US" uiCulture="en" requestEncoding="UTF-8" responseEncoding="UTF-8" fileEncoding="UTF-8" />
b) <globalization
culture="en-US"
uiCulture="en"
requestEncoding="UTF-8"
responseEncoding="UTF-8"
fileEncoding="UTF-8" />

Basically, I would like to ignore the line spans on these two statements which are "equal". I have tried every combination of options I can think of and even my own regex, none of which seems to have the desired effect.

Thank you.
Scott

Chris
06-Feb-2007, 04:06 PM
Hi Scott,

Beyond Compare will always see a line break (CRLF) as a difference. There isn't a way to ignore line breaks.

What you can do is standardize the formatting of the files before opening them in Beyond Compare's File Viewer.

You can use the HTML Tidy/XML Tidy rule to standardize the formatting for comparison:
http://www.scootersoftware.com/download.php?c=kb_morerules

The XML Tidy rule doesn't include .config in its file extensions, so you'll either have to edit the rule to include .config, or use the Tools|Pick Rules command to force the rule to be used.