Experimental Xpath Updates

Rating:        Based on 1 rating
Reviewed:  1 review
Downloads: 1611
Change Set: 67079
Released: Jun 6, 2010
Updated: Jun 26, 2010 by DarthObiwan
Dev status: Alpha Help Icon

Recommended Download

Application HtmlAgilityPack.Xpath.Experimental.zip
application, 148K, uploaded Jun 7, 2010 - 1611 downloads

Release Notes

In efforts to update make Html Agility Pack's Xpath support to be identical to System.Xml.Xpath I have updated HAP to have HtmlNode and HtmlAttribute implement a base interface. This interface IHtmlBaseNode is now the primary type returned by XPATH operations. Now queries that are trying to just retrieve an HtmlAttribute will do just that. Instead of returning the HtmlNode that includes the attribute. Example, an doc.Document.SelectNodes("//@href") will return a list of HtmlAttribute objects.

This release is Experimental and does introduce some large breaking changes. Thus I'm putting this in an branch for 2.0 labeled as experimental.
Breaking Changes:
  • SelectSingleNode returns IHtmlBaseNode
  • SelectNodes returns List<IHtmlBaseNode>
  • SelectNodes will never return null, if no matching elements are found it will return an empty list

The source code can be found in SVN under branches/2.0.Experimental

Reviews for this release

change set 85353 build error ? i deleted the question marked .snk file , rebuild , no error but when referencing this dll , FileNotFoundException : Could not load file or assembly 'HtmlAgilityPack, Version=, Culture=en-US, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. help pls !
by dfang on Feb 28, 2011 at 1:58 AM