gonzalez wrote:
I'm trying to get the absolute xpath to a node in DOM (XmlDocument). I know
I can build it by warlking the tree recursively, but I'm wondering if there
is an API in DOM or in XPathNavigator that allows me to get the absolute
path for a given node?
The DOM in .NET (XmlDocument, XmlNode, etc) (at least 1.1) in my view
has no API to give you the absolute XPath expression to a node.
As for XPathNavigator I don't see any methods or properties in there
either to simply give you an XPath expression to a node.
So you are right, with XmlDocument and a node in that document you need
to walk the document tree to build that XPath.
--
Martin Honnen
http://JavaScript.FAQTs.com/