Based on the HTML Agility Pack parser, this engine will select elements from an HTML page based on a CSS selector. There are 70 unit tests - see below for more information. The tests are based on the
... [More]
jQuery selector engine tests. At this time, the library is ALPHA quality, as I would like to improved the tests by improving the test data.
Contributions for refactoring, improved tests, and increased selector support would be welcome.
Introductory blog post: http://colinramsay.co.uk/diary/2008/10/19/fizzler-a-css-selector-engine-for-c-sharp/
ExamplesWe have this HTML in a string variable called html:
Fizzler
CSS Selector Engine
var engine = new Fizzler.Parser.SelectorEngine(html);
engine.Parse(".content"); // returns [Fizzler
]
engine.Parse("p"); // ret [Less]