Java calls for XML adding.
Has anyone used the 'importNode' and the 'replaceChild' methods
of Interface Document and Node or adding 2 XML documents ?
I need to add 2 XML documents in Java.
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>
My Java code is trying to use this
DocumentOne.importNode(DocumentTwo,true)
DocumentOne.replaceChild...
Please,has anyone used the above methods?
How can I add both the XML docs?
Help really appreciated

