Hi guys,
Im brand new to doing tansformations and cannot seem to wrap my head around it.
I have a Xml File which looks something like
<parentNode>
<childnode1 att1="1" att2="2"/>
<childnode2></childnode2>
<childnode1 att1="1" att2="2"/>
<childnode21></childnode21>
<childnode1 att1="1" att2="2"/>
<childnode22></childnode22>
<childnode1 att1="1" att2="2"/>
<childnode23></childnode23>
<childnode1 att1="1" att2="2"/>
<childnode24></childnode24>
<optionalNode></optionalNode>
</parentNode>
The childnode labled ChildNode1 is repeated several times (the values are identical) and what i am trying to do is transform this xml into a new xml which only has one childnode1
and teh rest are "deleted" or ignored during the transformation.Everything else must stay the same and the position of the childnode needs to be the first position it is found in.
I know the name of the childNode1 before hand.
<parentNode>
<childnode1 att1="1" att2="2"/>
<childnode2></childnode2>
<childnode21></childnode21>
<childnode22></childnode22>
<childnode23></childnode23>
<childnode24></childnode24>
<optionalNode></optionalNode>
</parentNode>
Is this even possible?
How should i go about it.
Thank you