I have a source xml which needs to be compared against xml template(another xml file).
The following needs to be implemented,
- The order of the source xml needs to be transformed as per the order in the template xml.
- If the elements in the template xml are not found in the source xml then it should be added.
Basically what should I need to do this, compare 2 xml's and need to change one xml based on other.
I have an idea of creating XDocument
with 2 xml's and by accessing xpath of source xml from template xml, Rearrange the elements and add elements if not found.
Please advise whether this is a better approach, or anything can be added into this?