开发者

Reading info inside a node of an XML using dataset

开发者 https://www.devze.com 2022-12-17 04:53 出处:网络
<cat number=\"35\"> <eye>brown</eye> <tail>long</tail> </cat> <dog number=\"35\">
<cat number="35">
 <eye>brown</eye>
 <tail>long</tail>
</cat>
<dog number="35">
 <eye>green</eye>
 <tail>short</tail>
</dog>

I've loaded an XML like this into a dataset, and to access info i'm just us开发者_如何学Cing this:

ds.Tables(cat).Rows(0)(eye) //returns brown

but i'd like to get the cat's number, how do i access this information using one line code to access one at a time (not some routine that loads every 'inside node property' (?) in an array or something) ?


This is something which stackoverflow returned on search.

This might give you something to start off with.Check this link

Cheers :-) .. Hope that helped..

0

精彩评论

暂无评论...
验证码 换一张
取 消