Package org.htmlparser

Examples of org.htmlparser.StringNode


  public void testStringWithEmptyLine() throws ParserException {
    createParser("a\n\nb");
    parseAndAssertNodeCount(1);
    assertTrue("First node should be HTMLStringNode", node[0] instanceof StringNode);
    StringNode stringNode = (StringNode) node[0];
    assertStringEquals("First String node contents", "a\r\n\r\nb", stringNode.getText());
  }
View Full Code Here


  public void testStringWithLineBreaks() throws Exception {
    createParser("Testing &\nRefactoring");
    parseAndAssertNodeCount(1);
    assertType("first node", StringNode.class, node[0]);
    StringNode stringNode = (StringNode) node[0];
    assertStringEquals("text", "Testing &\r\nRefactoring", stringNode.toPlainTextString());
  }
View Full Code Here

TOP

Related Classes of org.htmlparser.StringNode

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.