What is the best/fastest way to merge two xml documents with ruby?
I have two xml files, one that's formatted so it is visually appealing, one that isn't (and it has comments and whitespaces stripped) that has a few changes to some of the nodes throughout, and it gets changed often. So I'm trying to figure out a simple and efficient solution to check what's changed (they may not all have IDs), and merge the old document with the formatted document.
Ara Howard posted a snippet a few months ago for comparing XML documents: Comparing XML.
There's a gem for this equivalent-xml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With