Package org.htmlparser.scanners

Examples of org.htmlparser.scanners.TableScanner


        + "    </td>" + "  </tr>" + "</table>";
  }

  public void testScan() throws Exception {
    createParser(createHtmlWithTable());
    parser.addScanner(new TableScanner(parser));
    parseAndAssertNodeCount(1);
    assertTrue(node[0] instanceof TableTag);
    TableTag tableTag = (TableTag) node[0];
    assertEquals("rows", 1, tableTag.getRowCount());
    TableRow row = tableTag.getRow(0);
View Full Code Here


    createParser("<table>" + "  <DIV>" + "    <SPAN>The Refactoring Challenge</SPAN>" + "    <SPAN>&#013;id: 6</SPAN>"
        + "  </DIV>" + "</table>");
    parser.registerScanners();
    parser.addScanner(new DivScanner());
    parser.addScanner(new SpanScanner());
    parser.addScanner(new TableScanner(parser));
    parseAndAssertNodeCount(1);
    TableTag tableTag = (TableTag) node[0];
    NodeList nodeList = new NodeList();
    tableTag.collectInto(nodeList, Span.class);
    Node[] spans = nodeList.toNodeArray();
View Full Code Here

  private boolean bodyTagBegin;

  public HtmlPage(Parser parser) {
    super(false);
    parser.registerScanners();
    parser.addScanner(new TableScanner(parser));
    nodesInBody = new NodeList();
    tables = new NodeList();
    bodyTagBegin = false;
  }
View Full Code Here

    addScanner(new FrameSetScanner("-r"));
    addScanner(linkScanner.createBaseHREFScanner("-b"));
    addScanner(new BulletListScanner("-bulletList", this));
    // addScanner(new SpanScanner("-p"));
    addScanner(new DivScanner("-div"));
    addScanner(new TableScanner(this));
  }
View Full Code Here

TOP

Related Classes of org.htmlparser.scanners.TableScanner

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.