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

Namespace Error in XPATH Navigation (VB.NET)

Status
Not open for further replies.

Utnapishtim

IS-IT--Management
Joined
Jan 29, 2004
Messages
6
Location
US
<?xml version="1.0" encoding="UTF-8" ?>
- <SOAP:Envelope xmlns=" xmlns:SOAP=" xmlns:efile=" xmlns:xsi=" xsi:schemaLocation=" ../message/SOAP.xsd ../message/efileMessage.xsd">

The offending part of the xml document is listed above. When the prefix and xmlns information is removed, the vb code works fine, otherwise, the final statement in the code that follows generates this message:

XML Exception: Namespace Manager or XsltContext needed. This query has prefix or variable or userdefined function.


shorthand version of the code follows:

Dim xpathDoc As XPathDocument
Dim xmlNav As XPathNavigator
Dim xmlNI As XPathNodeIterator

xpathDoc = New XPathDocument("c:\inetpub\xmlNav = xpathDoc.CreateNavigator()

xmlNI = xmlNav.Select("/SOAP:Envelope/Body/OriginManifest/ItemReference")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top