I can sucessfully returning the correct string using XPath, but not sure
how to select inner node in XML.

Following is how my XML looks like:
<Phonelist>
 <address aid='1'>
  <firstname>Farhan</firstname>
  <lastname>Shah</lastname>
  <ext>237</ext>
  <cellphone>5132263305</cellphone>
  <clientphone></clientphone>
  <voicemail>309</voicemail>
  <email>fshah</email>
  <password>12345</password>
  <pin>1234</pin>
 </address>
</Phonelist>

and following is how my code looks like:

        Dim xdoc As New XPathDocument(Server.MapPath("phonenumbers.xml"))
        Dim xnav As XPathNavigator
        Dim xnodes As XPathNodeIterator

        xnav = xdoc.CreateNavigator()
        xnodes = xnav.Select("/Phonelist/address[firstname =""Farhan""]")

        Response.Write(xnodes.Current.ToString())

I want to select "Cellphone" Node etc. how will i do that?

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to