I would like to return a list of nodes, but i need the list to be distinct.
This is my first attempt to find items that are distinct by "city";
nodes = xdoc.SelectNodes("//person/location[not(city=preceding-sibling::city)]/city")
<person id="001">
<location>
<address1>8858 King St</address1>
<address2></address2>
<address3></address3>
<postalcode>T5T 6Y6</postalcode>
<city>Edmonton</city>
<provstate>AB</provstate>
</location>
</person>
Any suggestions would be great!
Thanks,
Milton
This is my first attempt to find items that are distinct by "city";
nodes = xdoc.SelectNodes("//person/location[not(city=preceding-sibling::city)]/city")
<person id="001">
<location>
<address1>8858 King St</address1>
<address2></address2>
<address3></address3>
<postalcode>T5T 6Y6</postalcode>
<city>Edmonton</city>
<provstate>AB</provstate>
</location>
</person>
Any suggestions would be great!
Thanks,
Milton