Below the XML which has duplicate values at node 1 and node 3.
<document>
<item>
<ID>1000909090</ID>
<flex>
<attrGroupMany name="pageinfo">
<row>
<attr name="pagelength">10</attr>
<attr name="pagewidth">20</attr>
<attr name="pageheight">30</attr>
</row>
<row>
<attr name="pagelength">50</attr>
<attr name="pagewidth">60</attr>
<attr name="pageheight">70</attr>
</row>
<row>
<attr name="pagelength">10</attr>
<attr name="pagewidth">20</attr>
<attr name="pageheight">30</attr>
</row>
</attrGroupMany>
</flex>
</item>
</document>
The output should not be having duplicate and the output XML should be in the below format
<?xml version="1.0" encoding="UTF-8"?>
<pagedetails>
<pagedata>
<Relationship>
<RelationType>PAGEDETAILSINFO</RelationType>
<RelatedItems count="2">
<RelatedItem referenceKey="PAGEDETAILSINFO-1000909090-10-20-30" />
<RelatedItem referenceKey="PAGEDETAILSINFO-1000909090-50-60-70" />
</RelatedItems>
</Relationship>
</pagedata>
</pagedetails>
No comments:
Post a Comment