Package org.htmlparser

Examples of org.htmlparser.RemarkNode


        parseAndAssertNodeCount(8);
        // The first node should be a HTMLRemarkNode
        assertTrue(
            "First node should be a HTMLRemarkNode",
            node[0] instanceof RemarkNode);
        RemarkNode remarkNode = (RemarkNode) node[0];
        assertEquals(
            "Text of the remarkNode #1",
            " saved from url=(0022)http://internet.e-mail ",
            remarkNode.getText());
        // The sixth node should be a HTMLRemarkNode
        assertTrue(
            "Sixth node should be a HTMLRemarkNode",
            node[5] instanceof RemarkNode);
        remarkNode = (RemarkNode) node[5];
        assertEquals(
            "Text of the remarkNode #6",
            "\r\n   Whats gonna happen now ?\r\n",
            remarkNode.getText());
    }
View Full Code Here


        parseAndAssertNodeCount(8);
        // The first node should be a HTMLRemarkNode
        assertTrue(
            "First node should be a HTMLRemarkNode",
            node[0] instanceof RemarkNode);
        RemarkNode remarkNode = (RemarkNode) node[0];
        assertEquals(
            "Plain Text of the remarkNode #1",
            " saved from url=(0022)http://internet.e-mail ",
            remarkNode.toPlainTextString());
        // The sixth node should be a HTMLRemarkNode
        assertTrue(
            "Sixth node should be a HTMLRemarkNode",
            node[5] instanceof RemarkNode);
        remarkNode = (RemarkNode) node[5];
        assertEquals(
            "Plain Text of the remarkNode #6",
            "\r\n   Whats gonna happen now ?\r\n",
            remarkNode.getText());

    }
View Full Code Here

        parseAndAssertNodeCount(8);
        // The first node should be a HTMLRemarkNode
        assertTrue(
            "First node should be a HTMLRemarkNode",
            node[0] instanceof RemarkNode);
        RemarkNode remarkNode = (RemarkNode) node[0];
        assertStringEquals(
            "Raw String of the remarkNode #1",
            "<!-- saved from url=(0022)http://internet.e-mail -->",
            remarkNode.toHtml());
        // The sixth node should be a HTMLRemarkNode
        assertTrue(
            "Sixth node should be a HTMLRemarkNode",
            node[5] instanceof RemarkNode);
        remarkNode = (RemarkNode) node[5];
        assertStringEquals(
            "Raw String of the remarkNode #6",
            "<!--\r\n   Whats gonna happen now ?\r\n-->",
            remarkNode.toHtml());
    }
View Full Code Here

        Parser.setLineSeparator("\r\n");
        parseAndAssertNodeCount(1);
        assertTrue(
            "Node should be a HTMLRemarkNode",
            node[0] instanceof RemarkNode);
        RemarkNode remarkNode = (RemarkNode) node[0];
        assertEquals("Expected contents", "\r\n", remarkNode.getText());

    }
View Full Code Here

        createParser("<!-->");
        parseAndAssertNodeCount(1);
        assertTrue(
            "Node should be a HTMLRemarkNode",
            node[0] instanceof RemarkNode);
        RemarkNode remarkNode = (RemarkNode) node[0];
        assertEquals("Expected contents", "", remarkNode.getText());

    }
View Full Code Here

        Parser.setLineSeparator("\n");
        parseAndAssertNodeCount(1);
        assertTrue(
            "Node should be a HTMLRemarkNode",
            node[0] instanceof RemarkNode);
        RemarkNode remarkNode = (RemarkNode) node[0];
        assertStringEquals(
            "Expected contents",
            " \n<A>\nbcd ",
            remarkNode.getText());

    }
View Full Code Here

        createParser("<!-- -- -->");
        parseAndAssertNodeCount(1);
        assertTrue(
            "Node should be a HTMLRemarkNode but was " + node[0],
            node[0] instanceof RemarkNode);
        RemarkNode remarkNode = (RemarkNode) node[0];
        assertEquals("Remark Node contents", " -- ", remarkNode.getText());
    }
View Full Code Here

                + "</HTML>\n");
        parseAndAssertNodeCount(10);
        assertTrue(
            "Node should be a HTMLRemarkNode but was " + node[7],
            node[7] instanceof RemarkNode);
        RemarkNode remarkNode = (RemarkNode) node[7];
        assertEquals(
            "Remark Node contents",
            " Id: html-sgml.sgm,v 1.5 1995/05/26 21:29:50 connolly Exp  ",
            remarkNode.getText());
    }
View Full Code Here

                + "</HTML>\n");
        parseAndAssertNodeCount(10);
        assertTrue(
            "Node should be a HTMLRemarkNode but was " + node[7],
            node[7] instanceof RemarkNode);
        RemarkNode remarkNode = (RemarkNode) node[7];
        assertEquals(
            "Remark Node contents",
            " another -- -- comment ",
            remarkNode.getText());
    }
View Full Code Here

                + "</HTML>\n");
        parseAndAssertNodeCount(10);
        assertTrue(
            "Node should be a HTMLRemarkNode but was " + node[7],
            node[7] instanceof RemarkNode);
        RemarkNode remarkNode = (RemarkNode) node[7];
        assertEquals("Remark Node contents", "", remarkNode.getText());
    }
View Full Code Here

TOP

Related Classes of org.htmlparser.RemarkNode

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.