|
-
May 11th, 2003, 10:13 AM
#1
Thread Starter
Fanatic Member
xml data
How is it possible to get to a specific item in xml?
For example here is my xml data and I would like to get the value of the <id></id> of the last element. In this case it is 7:
Thanks
<user>
<id>6</id>
<firstname>jay</firstname>
<surname>wigmore</surname>
<age>28</age>
<phone>876543</phone>
<email>[email protected]</email>
</user>
<user>
<id>7</id>
<firstname>john</firstname>
<surname>jackson</surname>
<age>32</age>
<phone>1234 567</phone>
<email>[email protected]</email>
</user>
-
May 11th, 2003, 05:49 PM
#2
To be proper formed XML all these elements would have to be in one root table, but I assume you just didn't post that part. You can either load them into a dataset thru the ReadXML method or use the XMLDocument and the SelectSingleNode method. The help on either of these methods should provide examples enough to get you going.
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
|