0

I want to compare 2 web.config files by content, so that the difference is shown in terms of line number. I don't want to use Compare-Object as it compares line by line, which is not exactly the proper method for comparison.

Shelly Tomar
  • 185
  • 1
  • 10

3 Answers3

0

Perhaps XmlDiff can help. It understands XML and generates a difference.

Richard Schneider
  • 34,944
  • 9
  • 57
  • 73
0

Have you considered to Serialize the config files? You can even generate classes with xsd.exe and use the objects in your program as you like.

0

You are looking for compare two web.config it means you wants two xml files, so you have to think that

You can use Xdocument object, Initialize two diffrunt XDocument object and load both xml respectivly

ref this answer

Community
  • 1
  • 1
ITGenius
  • 129
  • 2
  • 14