of Interface Document and Node or adding 2 XML documents ?
I need to add 2 XML documents in Java.
Expand|Select|Wrap|Line Numbers
- DocumentOne
- -----------
- <?xml version="1.0" encoding="UTF-8"?>
- <i:Interest xmlns:i="http://www.ABC.com/interests:i">
- <i:ID>0</i:ID><i:Generation/>
- <i:Delta/><i:Ref/>
- </i:Interest>
- DocumentTwo
- -----------
- <i:Underlying xmlns:i="common" xmlns:common="http://www.ABC.com/common" value="KGF">
- <common:Code>KGF</common:Code>
- <common:Class>STOCK</common:Class>
- </i:Underlying>
- Output Format
- -------------
- <?xml version="1.0" encoding="UTF-8"?>
- <i:Interest xmlns:i="http://www.ABC.com/interests:i">
- <i:ID>0</i:ID><i:Generation/>
- <i:Delta/><i:Ref/>
- <i:Underlying xmlns:i="common" xmlns:common="http://www.ABC.com/common" value="KGF">
- <common:Code>KGF</common:Code>
- <common:Class>STOCK</common:Class>
- </i:Underlying>
- </i:Interest>
Expand|Select|Wrap|Line Numbers
- DocumentOne.importNode(DocumentTwo,true)
- DocumentOne.replaceChild...
Please,has anyone used the above methods?
How can I add both the XML docs?
Help really appreciated