Compare/Diff the nodes between 2 XML Files

Questions about XML that are not covered by the other forums should go here.
steemer473
Posts: 2

Compare/Diff the nodes between 2 XML Files

Thu Sep 28, 2017 10:02 pm

Hello Tech Support,

How do you compare/diff the nodes (tags) of two xml files and then merge the tags into the second xml file? I would like to isolate the nodes of both files and then do a diff/merge. Thank you.
tavy
Posts: 122

Re: Compare/Diff the nodes between 2 XML Files

Fri Sep 29, 2017 11:49 am

Hello,

We do not have such a feature. You need to compare the entire documents.
You can use the "Ignore nodes by XPath" feature, to ignore the changes from the document that are made in other nodes. For this you need to create an XPath expression that matches all the nodes from the document other than the one you are interested in.
In this way you will see just the changes from the nodes you are interested in, and you can merge them using the merge actions.

Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
steemer473
Posts: 2

Re: Compare/Diff the nodes between 2 XML Files

Fri Sep 29, 2017 1:55 pm

Okay, thank you Octavian for your reply. Is there a way to just export out the nodes only?
tavy
Posts: 122

Re: Compare/Diff the nodes between 2 XML Files

Fri Sep 29, 2017 2:19 pm

Hello,

There is no action to do this automatically. You can create a stylesheet that copies the nodes that you need and apply it on the XML files.

Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 0 guests