Get XPath to document node

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Is there an easy way to get an XPath expression (in string format) to an
arbitrary node in a XmlDocument.

E.g.:

string s = node.XpathToString().

s = "myRoot/foo[@bar='altova']/myChild/text()"

Regards Jesper.
 
Jesper said:
Is there an easy way to get an XPath expression (in string format) to an
arbitrary node in a XmlDocument.

E.g.:

string s = node.XpathToString().

s = "myRoot/foo[@bar='altova']/myChild/text()"

There is no method in the .NET framework to generate an XPath expression
from a node, you would have to write your own code to do that.
 
Back
Top