Link to home
Start Free TrialLog in
Avatar of vcurtis
vcurtis

asked on

c# compare to xml files to find the difference

Hello
  I have two xml files and I want to print the difference between  the two (finding the updates). Has anyone done this before? Does anyone have a script they care to share
Avatar of kaufmed
kaufmed
Flag of United States of America image

How detailed are you trying to go? Are you going to compare elements by namespace as well, or is this just more of a textual comparison? If the latter, why not just download a file compare utility and invoke it via the Process class?
Avatar of vcurtis
vcurtis

ASKER

First, thank you for taking the time

I want to compare elements. I have name address phone city and state for each. I need to compare yesterdays files with today and identify when one has been updated.
Understood, but are namespaces involved? Is it possible to post an example of the XML, and maybe the schema (if one is defined)?
Avatar of vcurtis

ASKER

Requested file uploaded.
Members.xml
I believe käµfm³d's suggestion about textual comparison is OK for such files.

However, I'd write a utility that compares element (text nodes) values. This should be pretty straightforward.
We went this way (some years ago) when we had to compare pretty big and rather complex xml files.
Avatar of vcurtis

ASKER

Yes, I get the idea. Just do not know how it is done. Was hoping to  get some assistance. I am new to this and the boss is acting like I have been  doing it for years
SOLUTION
Avatar of Dmitry G
Dmitry G
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Can you post the schema of the XML as well an actual copy of the XML file.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vcurtis

ASKER

Thank you so much, you just made me the hero of my company " Until the next problem comes up that is"