Easier way to get xmlAttributes from xpaths?

K

Kathy Burke

Hi, within asp.net, I'm using xpaths to retrieve data from xml strings.
For example:

Dim n10 As XmlElement = xDoc.SelectSingleNode("//Station/Timer[last()]")

The Timer element has several attributes (on, off, etc.) that I would
like to retrieve and set as a variable.

I've been using xmlAttribute =
xDoc.SelectSingleNode("//Station/Timer[last()]/@on") etc. to get the
individual attribute values.

Just wondering if there was a way to retrieve the attributes from the
XmlElement node instead of all the individual xmlAttributes ones???

Thanks,

Kathy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top