What is the best way for me to merge two xml strings in java?
+1
A:
Depends on what you mean by "merge" - if you just need them to become a single document, erickson's solution will work. If you need to blend them together in order to to combine matching tags, etc., you're going to have to start by parsing them into Documents, then combining the parts you care about into a new Document, then writing THAT out as XML.
Curtis
2010-07-08 21:53:27