@@ -0,0 +1,1253 @@
+package org.htmlcleaner;%0D%0A%0D%0Aimport junit.framework.*;%0D%0A%0D%0Aimport java.io.*;%0D%0A%0D%0A/**%0D%0A * Testing XPath expressions against TagNodes results from cleaning process.%0D%0A */%0D%0Apublic class VisitorTest extends TestCase %7B%0D%0A%0D%0A    private TagNode node;%0D%0A    private CleanerProperties props;%0D%0A%0D%0A    protected void setUp() throws Exception %7B%0D%0A        HtmlCleaner cleaner = new HtmlCleaner();%0D%0A        props = cleaner.getProperties();%0D%0A        node = cleaner.clean( new File(%22src/test/resources/test9.html%22) );%0D%0A    %7D%0D%0A%0D%0A    public void testNodeTraverse() throws IOException, XPatherException %7B%0D%0A        node.traverse(new TagNodeVisitor() %7B%0D%0A            public boolean visit(TagNode parentNode, HtmlNode node) %7B%0D%0A                if (node instanceof TagNode) %7B%0D%0A                    TagNode tagNode = (TagNode) node;%0D%0A                    String name = tagNode.getName();%0D%0A                    if ( %22p%22.equals(name) ) %7B%0D%0A                        tagNode.removeAllChildren();%0D%0A                    %7D%0D%0A                %7D else if (node instanceof ContentNode) %7B%0D%0A                %7D else if (node instanceof CommentNode) %7B%0D%0A                %7D%0D%0A%0D%0A                return true;%0D%0A            %7D%0D%0A        %7D);%0D%0A%0D%0A        assertEquals(node.evaluateXPath(%22//p%5B1%5D/*%22).length, 0);%0D%0A    %7D%0D%0A%0D%0A%7D%0D%0A

Test cases updated