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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Colons in XPath

Status
Not open for further replies.

Genimuse

Programmer
May 15, 2003
1,797
US
Is there a way to escape or otherwise work with colons in element names under XPath? The XML looks like this:
Code:
<AB:Animal>
  <AB:Pet>
    Dog
  </AB:Pet>
</AB:Animal>
I'd like to access AB:pet, but "//AB:pet" will always fail.

Sorry, XPath newbie, this may be obvious.
 
I realize now that I need to specify a namespace in order to ignore the AB:. Not sure how to specify a local file as the namespace in VB.net, but at least I'm on the track.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top