convert xml to tree strcuture
Posted: Mon Mar 21, 2016 1:42 pm
Hi ,
I am new to XML. I want to convert the below xml to one like output. Is it possible.?? if yes how do i do it??
I am new to XML. I want to convert the below xml to one like output. Is it possible.?? if yes how do i do it??
Code: Select all
INPUT
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Rowsets>
<Rowset>
<Row>
<GroupName>Parent1</GroupName>
<ParentGroupName>Root</ParentGroupName>
</Row>
<Row>
<GroupName>Child1</GroupName>
<ParentGroupName>Parent1</ParentGroupName>
</Row>
<Row>
<GroupName>Child2</GroupName>
<ParentGroupName>Parent1</ParentGroupName>
</Row>
<Row>
<GroupName>Child3</GroupName>
<ParentGroupName>Parent1</ParentGroupName>
</Row>
<Row>
<GroupName>Parent2</GroupName>
<ParentGroupName>Root</ParentGroupName>
</Row>
<Row>
<GroupName>Child1</GroupName>
<ParentGroupName>Parent2</ParentGroupName>
</Row>
<Row>
<GroupName>Child2</GroupName>
<ParentGroupName>Parent2</ParentGroupName>
</Row>
<Row>
<GroupName>Child3</GroupName>
<ParentGroupName>Parent2</ParentGroupName>
</Row>
</Rowset>
</Rowsets>
Code: Select all
OUTPUT
Root
Parent1
Child1
Child2
Child3
Parent2
Child1
Child2
Child3