getting specific attribute from xml file

P

Passero

How can i easly get the value of a specific attribute from an xml file.
It is an attribute that is present with most of the elements but not
all. I never worked with xml in asp.net, i can work wit SAX in java but
my application has to work in asp.net
 
C

Craig Deelsnyder

How can i easly get the value of a specific attribute from an xml file.
It is an attribute that is present with most of the elements but not
all. I never worked with xml in asp.net, i can work wit SAX in java but
my application has to work in asp.net

Use an XPath expression to find a node with the attribute you want, here's
the method to select a single node:

http://msdn.microsoft.com/library/d...stemxmlxmlnodeclassselectsinglenodetopic1.asp

other methods are listed there as well...the XmlNode has an Attributes
property...
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top