Examples of LinkScanner


Examples of org.htmlparser.scanners.LinkScanner

  /**
   * This is the reproduction of a bug which produces multiple text copies.
   */
  public void testExtractLinkInvertedCommasBug2() throws ParserException {
    createParser("<a href=\"http://cbc.ca/artsCanada/stories/greatnorth271202\" class=\"lgblacku\">Vancouver schools plan 'Great Northern Way'</a>");
    parser.addScanner(new LinkScanner("-l"));
    parseAndAssertNodeCount(1);
    assertTrue("The node should be a link tag", node[0] instanceof LinkTag);
    LinkTag linkTag = (LinkTag) node[0];
    assertStringEquals("Extracted Text", "Vancouver schools plan 'Great Northern Way'", linkTag.getLinkText());
  }
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.