> nsMgr.AddNamespace(String.Empty,
> "http://samplesoap.cbis.infocomp.com")
Although the XML has no prefix for that namespace for XPath you need to
use one here e.g.
nsMgr.AddNamespace("cb",
"http://samplesoap.cbis.infocomp.com")
and here e.g.
> Dim node As XmlNode = resultXml.SelectSingleNode("//out",
> nsMgr)
Dim node As XmlNode = resultXml.SelectSingleNode("//cb:out", nsMgr)

Signature
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Amir - 15 Mar 2007 18:24 GMT
Martin you are a star! Thanks!
Where does the prefix "cb" come from? I have been looking at this for the
past 2 hours!
> > nsMgr.AddNamespace(String.Empty,
> > "http://samplesoap.cbis.infocomp.com")
[quoted text clipped - 11 lines]
>
> Dim node As XmlNode = resultXml.SelectSingleNode("//cb:out", nsMgr)
Martin Honnen - 15 Mar 2007 18:36 GMT
> Where does the prefix "cb" come from? I have been looking at this for the
> past 2 hours!
You can choose any prefix you like, you just need to use a prefix as
those elements are in a namespace. The XML document uses a default
namespace declaration (e.g.
xmlns="http://samplesoap.cbis.infocomp.com"
) but XPath 1.0 does not know a default namespace. So with XPath 1.0 to
select elements in a certain namespace you need to bind a prefix to the
namespace URI and use that prefix to qualify element names.

Signature
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/