|
-
May 17th, 2002, 08:05 AM
#1
Thread Starter
Member
Distinct, ordered XML nodes
I have the following XML:
Code:
<places>
<place id=1>
<name>...</name>
<country>...</country>
.....
</place>
<place id=2>
.......
</place>
........
</places>
Many nodes can have the same country. What I want to do is create a select box, in ASP, with the list of countries, in alphabetical order.
I have the following, but this is not in order and has duplicated countries in the list.
Code:
Set oXML = getXML("places.xml")
Set oNL = oXML.selectNodes("//place/country")
For i = 0 to oNL.length - 1
strCountry = strCountry & "<option value=""" & oNL.item(i).text & """>" & oNL.item(i).text & vbcrlf
Next
Any ideas how I can do this?
RKW
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|