Can't access root attribute!

Reply

Join Date: Oct 2008
Posts: 1
Reputation: skydiverMN is an unknown quantity at this point 
Solved Threads: 0
skydiverMN skydiverMN is offline Offline
Newbie Poster

Can't access root attribute!

 
0
  #1
Oct 7th, 2008
I've read a ton of things online but i'm still unable to access the attribute within my root. My root is called "Customers" and the attribute is called "id". While I can see the text details (and everything else too) in the innerXML but I can't query it and get a value. I've tried /root@id, root@id, /@id,.... always coming up empty. Here's one of the many tries below:

XML, XSLT and XPATH Syntax (Toggle Plain Text)
  1. Dim xmlNav As XPathNavigator
  2. Dim xmlNI As XPathNodeIterator
  3.  
  4. Dim sTemp As String
  5.  
  6. Try
  7. xmlNav = xpathDoc.CreateNavigator()
  8. xmlNI = xmlNav.Select("root@id")
  9.  
  10. sTemp = xmlNI.Current.GetAttribute("id", String.Empty)
  11. and so on....

Any help is appreciated!

Thanks!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the XML, XSLT and XPATH Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC