Restructure an xml document
Posted
by krishna
on Stack Overflow
See other posts from Stack Overflow
or by krishna
Published on 2010-05-17T12:03:41Z
Indexed on
2010/05/17
12:10 UTC
Read the original article
Hit count: 194
here is my structure of xml document,
<worldpatentdata>
<patent-family>
<exchange-documents>......</exchange-documents>
<exchange-documents>......</exchange-documents>
<exchange-documents>......</exchange-documents>
<familymember>.....</familymember>
<exchange-documents>......</exchange-documents>
<exchange-documents>......</exchange-documents>
<familymember>.....</familymember>
<exchange-documents>......</exchange-documents>
<exchange-documents>......</exchange-documents>
<familymember>.....</familymember>
</patent-family>
</worldpatentdata>
In the above xml structure,all the element is found to be child node of element. I want these elements as childnode of element,so that the xml have the following structure,
<worldpatentdata>
<patent-family>
<familymember>.....
<exchange-documents>......</exchange-documents>
<exchange-documents>......</exchange-documents>
<exchange-documents>......</exchange-documents>
</familymember>
<familymember>.....
<exchange-documents>......</exchange-documents>
<exchange-documents>......</exchange-documents>
</familymember>
<familymember>.....
<exchange-documents>......</exchange-documents>
<exchange-documents>......</exchange-documents>
</familymember>
</patent-family>
</worldpatentdata>
can anybody help me on this? thanks
© Stack Overflow or respective owner