Html Agility Xpath Finder

Html Agility pack’s xpath does not seem to match firebug or google or IE xpath implementation so I wrote a little app to help find the xpath using the actual agility pack xpath engine. You can open an url using ctrl-u or clicking on file->open url. Once the url is open you can either type in a string to search in the find box or you can highlight the text in the browser and hit ctrl-k or go to search->find selection. You can only highlight text. In window I have labeled C will be list of xpath where that term appears in the outerHtml. The path highlighted in green is the lowest level xpath were the term appears. You can double click on any of the xpaths to display that particular path in the browser. This program need .net 4.0.

Html Agility Xpath (1174)


3 thoughts on “Html Agility Xpath Finder”

  1. Firstly an awesome utility. Thanks for sharing it.

    Have you set any options on the HtmlAgilityPack.HtmlDocument class such as OptionOutputAsXml? Reason being the xpath query returned by your utility does not find the same element when I use it in my class on the same url.

Leave a Reply

Your email address will not be published. Required fields are marked *

nine + 5 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>