Package org.htmlparser.tags

Examples of org.htmlparser.tags.ParagraphTag


        registerTag (new LabelTag ());
        registerTag (new LinkTag ());
        registerTag (new MetaTag ());
        registerTag (new ObjectTag ());
        registerTag (new OptionTag ());
        registerTag (new ParagraphTag ());
        registerTag (new ProcessingInstructionTag ());
        registerTag (new ScriptTag ());
        registerTag (new SelectTag ());
        registerTag (new StyleTag ());
        registerTag (new TableColumn ());
View Full Code Here


                "<INPUT TYPE=\"SUBMIT\">\n"+
            "</FORM>"
        );
        parseAndAssertNodeCount(5);
        assertTrue("Fourth Node is a paragraph",node[3] instanceof ParagraphTag);
        ParagraphTag paragraph = (ParagraphTag)node[3];
        assertTrue("Second Node of paragraph is a link", paragraph.getChildren ().elementAt (1) instanceof LinkTag);
        LinkTag linkTag = (LinkTag)paragraph.getChildren ().elementAt (1);
        assertEquals("Link Text","Yahoo!\n",linkTag.getLinkText());
        assertEquals("Link URL","http://www.yahoo.com",linkTag.getLink());
        assertType("Fifth Node",FormTag.class,node[4]);
    }
View Full Code Here

        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];
        for (NodeIterator e = parser.elements(); e.hasMoreNodes();)
            nodes[i++] = e.nextNode();
View Full Code Here

TOP

Related Classes of org.htmlparser.tags.ParagraphTag

Copyright © 2018 www.massapicom. 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.