search in an xml document

asish

Member
Joined
Jan 17, 2008
Messages
20
Programming Experience
Beginner
hi to all...i have an xml document (below) i want to search for the header parts and see if it is equal to an string.
e.g. if the string = "Abstract"...how to search for it in the xml document...
HTML:
<toc>
  <list>
    <header>OfficeWordCreatingASeedDocument</header>
    <description>Lesson Number: </description>
    <url>OfficeWordCreatingASeedDocument.xml</url>
    <id>1</id>
  </list>
  <list>
    <header>Abstract</header>
    <description>Lesson Number: </description>
    <url>Abstract.xml</url>
    <id>1</id>
  </list>
</toc>


thks...in advance.
 
Last edited by a moderator:
XPath is a language for finding information in an XML document.
VB.NET:
Dim nodes As Xml.XmlNodeList = doc.SelectNodes("//header[.='Abstract']")
'doc' is here the XmlDocument.
 
Back
Top