Package org.htmlparser.util

Examples of org.htmlparser.util.NodeList.asHtml()


                + "<tr>"
                + "  <td>cell 1</td>"
                + "  <td>cell 2</td>"
                + "</tr>"
                + "</table>",
            bodyNodes.asHtml());
        TableTag tables[] = page.getTables();
        assertEquals("number of tables", 1, tables.length);
        assertEquals("number of rows", 1, tables[0].getRowCount());
        TableRow row = tables[0].getRow(0);
        assertEquals("number of columns", 2, row.getColumnCount());
View Full Code Here


    HtmlPage page = new HtmlPage(parser);
    parser.visitAllNodesWith(page);
    NodeList bodyNodes = page.getBody();
    assertEquals("number of nodes in body", 2, bodyNodes.size());
    assertXmlEquals("body html", "Welcome to HTMLParser" + "<table>" + "<tr>" + "  <td>cell 1</td>"
        + "  <td>cell 2</td>" + "</tr>" + "</table>", bodyNodes.asHtml());
    TableTag tables[] = page.getTables();
    assertEquals("number of tables", 1, tables.length);
    assertEquals("number of rows", 1, tables[0].getRowCount());
    TableRow row = tables[0].getRow(0);
    assertEquals("number of columns", 2, row.getColumnCount());
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.