Package org.htmlparser.tags

Examples of org.htmlparser.tags.BodyTag.toHtml()


    parseAndAssertNodeCount(6);
    assertTrue(node[4] instanceof BodyTag);
    // check the body node
    BodyTag bodyTag = (BodyTag) node[4];
    assertEquals("Body", "This is a body tag", bodyTag.getBody());
    assertEquals("Body", "<BODY>This is a body tag</BODY>", bodyTag.toHtml());
    assertEquals("Body Scanner", bodyScanner, bodyTag.getThisScanner());
  }

  public void testBodywithJsp() throws ParserException {
    createParser("<html><head><title>Test 1</title></head><body><%=BodyValue%></body></html>");
View Full Code Here


    parser.addScanner(bodyScanner);
    parseAndAssertNodeCount(6);
    assertTrue(node[4] instanceof BodyTag);
    // check the body node
    BodyTag bodyTag = (BodyTag) node[4];
    assertStringEquals("Body", "<BODY><%=BodyValue%></BODY>", bodyTag.toHtml());
    assertEquals("Body Scanner", bodyScanner, bodyTag.getThisScanner());
  }

  public void testBodyMixed() throws ParserException {
    createParser("<html><head><title>Test 1</title></head><body>before jsp<%=BodyValue%>after jsp</body></html>");
View Full Code Here

    parser.addScanner(bodyScanner);
    parseAndAssertNodeCount(6);
    assertTrue(node[4] instanceof BodyTag);
    // check the body node
    BodyTag bodyTag = (BodyTag) node[4];
    assertEquals("Body", "<BODY>before jsp<%=BodyValue%>after jsp</BODY>", bodyTag.toHtml());
    assertEquals("Body Scanner", bodyScanner, bodyTag.getThisScanner());
  }

  public void testBodyEnding() throws ParserException {
    createParser("<html><body>before jsp<%=BodyValue%>after jsp</html>");
View Full Code Here

    parser.addScanner(bodyScanner);
    parseAndAssertNodeCount(3);
    assertTrue(node[1] instanceof BodyTag);
    // check the body node
    BodyTag bodyTag = (BodyTag) node[1];
    assertEquals("Body", "<BODY>before jsp<%=BodyValue%>after jsp</BODY>", bodyTag.toHtml());
    assertEquals("Body Scanner", bodyScanner, bodyTag.getThisScanner());
  }

  public static TestSuite suite() {
    return new TestSuite(BodyScannerTest.class);
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.