AnsweredAssumed Answered

How can I remove duplicate element groups from an XML document ?

Question asked by mark.springthorpe131988 on Feb 3, 2017
Latest reply on Feb 6, 2017 by mark.springthorpe131988

I have an XML document which could have duplicate element groups that I need to remove, e.g.

 

<response>

  <group>

    <elementA>AAA1</elementA>

    <elementB>AAA2</elementB> 

 </group>

  <group>

    <elementA>AAA1</elementA>

    <elementB>AAA8</elementB> 

 </group>

<group>

    <elementA>AAA1</elementA>

    <elementB>AAA2</elementB> 

 </group>

</response>

 

group 1 & 3 are duplicates, so I need to get it to 

 

<response>

  <group>

    <elementA>AAA1</elementA>

    <elementB>AAA2</elementB> 

 </group>

  <group>

    <elementA>AAA1</elementA>

    <elementB>AAA8</elementB> 

 </group>

 

</response>

 

What's the best way to achieve this ?

Outcomes