|
-
Jun 17th, 2008, 06:28 AM
#1
Thread Starter
Randalf the Red
Getting XPath of an XMLNode
I have an XML document. While reading it using the System.XML.XMLDocument object, I want to retrieve the XPath of each XMLNode that I am reading. Does anyone have any idea how it can be done?
.
-
Jun 17th, 2008, 07:46 AM
#2
Re: Getting XPath of an XMLNode
How do you get to the node whose XPath you want to figure out in the first place? Or are you asking how you can use XPath to get a node value?
-
Jun 18th, 2008, 01:18 AM
#3
Thread Starter
Randalf the Red
Re: Getting XPath of an XMLNode
 Originally Posted by mendhak
How do you get to the node whose XPath you want to figure out in the first place? Or are you asking how you can use XPath to get a node value?
I am using an XMLDocument object to traverse through the nodes. Now the XML file that I have to process has been structured in a way that some elements are repeated. For e.g. the Customer and Vendor nodes follow the same structure i.e. a Name element, an Address element and a Telephone element. While reading the document I would like to distinguish between the Customer set of elements and the Vendor set of elements. I hope you get the picture.
Now I could try to do this manually, but it is not proving fruitful. So just wanted to see if there was some way to get the XPath of a particular node when I am reading it off the XMLDocument tree.
.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|