If I have an xml file that does not necessarily have a strong schema and has many nodes, some may even be nested nodes - how can I compare with another xml string and update the destination with any updated values (and nodes perhaps)?
so if my input source had something like (and this can vary, it can be anything):
<updates>
<id>3</id>
<customer>
<source>CW</source>
<number>433</number>
<name>Jones</name>
</customer>
</updates>
Now, if I read a destination xml file/string from some source, it may contain the above structure or a different structure. I want to be able to update it by going through the nodes from the source above. So my destination XML could have something like:
<updates>
<id>3</id>
<customer>
<engine>Some engine</engine>
<number>43213</number>
<name>Taz</name>
<duration>4</duration>
</customer>
</updates>
The destination above would have the name and number updated because these 2 exist in the source file.
any ideas how to do this? Remember: it is not possible to know ahead of time what the xml nodes will be but do need to match and update if found.
thank you.