Examples of HeadTag


Examples of org.htmlparser.tags.HeadTag

        parseAndAssertNodeCount(1);
        assertTrue("First node should be a HTML tag", node[0] instanceof Html);
        Html html = (Html)node[0];
        assertTrue("HTML tag should have one child", 1 == html.getChildCount ());
        assertTrue("First child should be a HEAD tag", html.childAt (0) instanceof HeadTag);
        HeadTag head = (HeadTag)html.childAt (0);
        assertTrue("HEAD tag should have three children", 3 == head.getChildCount ());
        assertTrue("Third child should be a STYLE tag", head.childAt (2) instanceof StyleTag);
        StyleTag styleTag = (StyleTag)head.childAt (2);
        assertStringEquals("Expected Style Code",expectedCode,styleTag.getStyleCode());
    }
View Full Code Here

Examples of org.htmlparser.tags.HeadTag

        parser = new Parser(url);
        PrototypicalNodeFactory factory = new PrototypicalNodeFactory ();
        // we want to expose the repetitive tags
        factory.unregisterTag (new Html ());
        factory.unregisterTag (new HeadTag ());
        factory.unregisterTag (new BodyTag ());
        factory.unregisterTag (new ParagraphTag ());
        parser.setNodeFactory (factory);
        i = 0;
        nodes = new Node[50];
View Full Code Here

Examples of org.htmlparser.tags.HeadTag

  public String[] getID() {
    return MATCH_NAME;
  }

  public Tag createTag(TagData tagData, CompositeTagData compositeTagData) {
    return new HeadTag(tagData, compositeTagData);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.