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.
John Bailo - 16 Aug 2006 15:54 GMT
I tested your xml in Cooktop ( http://www.xmlcooktop.com/ )
I get the probing node with your Xpath if I drop the xmlns attribute of
assemblyBinding.
> Hello
>
[quoted text clipped - 19 lines]
> works OK. Am I doing something wrong?
> Thanks in advance.

Signature
Texeme Construct
http://www.myspace.com/texeme
Alexander Korol - 17 Aug 2006 07:29 GMT
Thanks I found the reason - had to add above given default_ns to the
namespaces manager. After that everything works ok.