Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / August 2006

Tip: Looking for answers? Try searching our database.

Help with valid XPath?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alexander Korol - 16 Aug 2006 14:44 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.