Need some help/guidance here, where my requirement is
- Source will send the XML data.
Example is:<?xml version="1.0" encoding="UTF-8"?> 0001 Parent 0002 Parent 003 0001 Child 004 0001 Child 055 003 Child 066 003 Child 777 055 Child 008 0002 Child 099 004 Child 123 0002 Child
- In the above XML, contains 3 tags that are ID, RelID and Category.
- The one which does have have RelID, that becomes parent and the one that has some value becomes the child
Example: In the above example:
0001 is the parent
and003 0001 Child
003, is the child for parent 0001.
Requirement is to convert the xml data to the following structure as attached in the screenshot. Any suggestion/code on how to proceed further with the logic here?
In the attached structure, we need to append the children to the respective parents in a hierarchy manner