AnsweredAssumed Answered

How to filter repeating XML elements similar to XPath

Question asked by sanjaydvr on May 23, 2018
Latest reply on May 31, 2018 by Adam Arrowsmith
Branched from an earlier discussion

Hi All,

My scenario is as mentioned below:

Input:

<Array>

 <Item>

     <name>1</name>

    <value>A</value>

 </Item>

<Item>

     <name>2</name>

    <value>C</value>

 </Item>

<Item>

     <name>1</name>

    <value>B</value>

 </Item>

</Array>

 

Required Output:

<Array>

 <Item>

     <name>1</name>

    <value>A</value>

 </Item>

<Item>

     <name>1</name>

    <value>B</value>

 </Item>

</Array>

 

Actually to filter out the array items with same matching value, similar to XPath execution  /Array/Item[name=1].

 

Any suggestions would be appreciated. 

 

NOTE: Actual XML profile is complex

 

Thanks

Sanjay

Outcomes