Help with valid XPath?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I am trying to parse the following xml fragment in xml file:

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
..
<probing privatePath="shared;deployed;v1compatibility" />
..
</assemblyBinding>
</runtime>
</configuration>

What I am interested in is <probing> element. The code I use is as follows:
Dim xml As New XML.XMLDocument
xml.Load("somefile.xml")
Dim nodes As System.Xml.XmlNodeList =
xml.SelectNodes("/configuration/runtime/assemblyBinding/probing")

The code returns 0 elements. But for path "/configuration/runtime" - it
works OK. Am I doing something wrong?
Thanks in advance.
 
Thanks I found the reason - had to add above given default_ns to the
namespaces manager. After that everything works ok.
 
Back
Top