Merging two xml documents using javascript?

ctgilles

New Member
If I have two xml documents and store them into two javascript variables (xA and xB), how would I merge them together(with overwriting)?For examplexA is\[code\] <cat> <name type="asdf" > Bob </name> <color> brown </color> <length> 8 </length> </cat>\[/code\]xB is \[code\]<root> <cat> <name type="fdsa" > Bob </name> <color> black </color> <weight> 14 </weight> </cat></root>\[/code\]xB merge onto xA (stored as a variable xC) is\[code\]<root> <cat> <name type="fdsa" > Bob </name> <color> black </color> <length> 8 </length> <weight> 14 </weight> </cat></root>\[/code\]And then I can print xC as string or save it, etc. How can I do this kind of merge in javascript?
 
Back
Top