Restructure an xml document
- by krishna
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