public void testSelectors() throws Exception
{
String html = "<html><head><title>sample title</title></head><body inserterr=\"true\" yomama=\"false\"><h3 id=\"heading\">big </invalid>heading</h3><ul id=\"things\"><li><br word=\"broken\"/>>moocow<li><applet/>doohickey<li class=\"last\"><b class=\"item\">final<br>item</b></ul></body></html>";
Lexer l;
Parser p;
CssSelectorNodeFilter it;
NodeIterator i;
int count;
l = new Lexer (html);
p = new Parser (l);
it = new CssSelectorNodeFilter ("li + li");
count = 0;
for (i = p.extractAllNodesThatMatch (it).elements (); i.hasMoreNodes ();)
{
assertEquals ("tag name wrong", "LI", ((Tag)i.nextNode()).getTagName());
count++;