Hi!
I need to convert some flat XML to nested one. But I don't know if it's possible.
Can anyone help?
Here is my source structure:
Code:
<root>
<Level_1>
<Item_1></Item_1>
<Item_2></Item_2>
</Level_1>
<Level_2>
<Item_21></Item_21>
<Item_22></Item_22>
</Level_2>
<Level_3>
<Item_31></Item_31>
<Item_32></Item_32>
</Level_3>
</root>
This is the target:
Code:
<root>
<Level_1>
<Item_1></Item_1>
<Item_2></Item_2>
<Level_2>
<Item_a></Item_a>
<Item_b></Item_b>
<Level_3>
<Item_a1></Item_a1>
<Item_a2></Item_a2>
</Level_3>
</Level_2>
</Level_1>
</root>
Each of levels can have 1 to n occurrences.
I found a post with similar problem:
(as I am a new member I can't include URL in my post, but you can see it on page 5, post named "Group by" problem )
But there was some relation between nodes and I don't have any.
So I don't know if it's possible, and I don't have any idea how to do this :(
Thanks for any help.
Igor