getting distinct values from attribute
hello,
how to get distinct values on a attribute? like:
input:
<family name="Kay" childs="Martin Rachel Michael Lara"/>
<family name="Smith" childs="Rod Martin"/>
<family name="Payne" childs="Lisa Britney"/>
output:
<family name="Kay">
<child name="Martin"/>
<child name="Rachel"/>
<child name="Michael"/>
<child name="Lara"/>
</family>
<family name="Smith">
<child name="Rod "/>
<child name="Martin"/>
</family>
How to do it and how can be the childs-Attribute on the input distinguished?
cheers
|