Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve the Attribute value of XML node directly from VB Code

Status
Not open for further replies.

kuttapan

Programmer
Jan 27, 2005
11
US
I am using a XML file to get data into my VB Application.
Is there a way to create a DOM object, and directly check the attribute value without looping?

Eg: Assume the xml file below

<?xml version="1.0" encoding="utf-8"?>
<ErrorCodes>
<Error Number="1" Action="ResumeNext" Description="D1" />
<Error Number="2" Action="ResumeNext" Description="D2" />
</ErrorCodes>

In my VB Code can i directly check for the value for the attribute "Number" inside the <Error/> node?


 
Yes. And a quick key word search in this forum should find a number of examples of how to do it
 
Search on "XPath".

Chip H.


____________________________________________________________________
Click here to learn Ways to help with Tsunami Relief
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top