Hi,
Anyone knows if its possible to do suchthing like choose a collection of elements from a XML tree, and depending of the value of an attribute of those elements, get only one element per attribute.
For exemple, if I have this:
<table id=2>
</table>
<table id=3>
</table>
<table id=2>
</table>
I would like to get a colleccion of table elements like this:
<table id=2>
</table>
<table id=3>
</table>
So, I don´t need another table element because the ID is the same. In other words, I would like to make a distinct in my XPath... to obtain an element table per ID.
Something like: getElementsByTagName("//table/distinct ID"
Is this possible?
Thank you,
Sergio Oliveira
Anyone knows if its possible to do suchthing like choose a collection of elements from a XML tree, and depending of the value of an attribute of those elements, get only one element per attribute.
For exemple, if I have this:
<table id=2>
</table>
<table id=3>
</table>
<table id=2>
</table>
I would like to get a colleccion of table elements like this:
<table id=2>
</table>
<table id=3>
</table>
So, I don´t need another table element because the ID is the same. In other words, I would like to make a distinct in my XPath... to obtain an element table per ID.
Something like: getElementsByTagName("//table/distinct ID"
Is this possible?
Thank you,
Sergio Oliveira