This project has moved and is read-only. For the latest updates, please go here.


HtmlNode.XPath Property


It would be nice to see an XPath property of the HTML Node class that return's a node's absolute xpath.


thany wrote Aug 24, 2007 at 12:17 PM

How would you like to see that? There are thousands of possible xpaths to a single node, and there's no such thing as one true absolute xpath to a node. If you want the path (not xpath) to a node, simply walk the parents until you reach the DocumentNode.

wrote Mar 26, 2009 at 6:47 AM

DarthObiwan wrote Sep 17, 2009 at 5:57 AM

I've added preliminary support for this on HtmlNode and HtmlAttribute . The properties get their relative xpath and add that on to their parent xpath.

DarthObiwan wrote Oct 3, 2009 at 6:44 AM

I have implemented a property that returns a valid Xpath to that particular node. Beta 1 contains the property but the path created had the #document element on it that was causing the path to not work. The next release will have this fixed

wrote Feb 22, 2013 at 2:47 AM

wrote May 16, 2013 at 1:33 PM

wrote May 16, 2013 at 1:33 PM

wrote Jun 14, 2013 at 8:35 AM