Package org.htmlparser.tags

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


    );
    EndTag endTag = (EndTag)node[2];
    assertStringEquals(
      "first custom tag html",
      "</CUSTOM>",
      endTag.toHtml()
    );
  }
 
  public void testParentConnections() throws ParserException {
    createParser(
View Full Code Here


   
    EndTag endTag = (EndTag)node[2];
    assertStringEquals(
      "first custom tag html",
      "</CUSTOM>",
      endTag.toHtml()
    );
    assertNull(
      "end tag should have no parent",
      endTag.getParent()
    );
View Full Code Here

        parser.registerScanners();
        parseAndAssertNodeCount(2);
        // The node should be an HTMLLinkTag
        assertTrue("Node should be a HTMLEndTag", node[1] instanceof EndTag);
        EndTag endTag = (EndTag) node[1];
        assertEquals("Raw String", "</HTML>", endTag.toHtml());
    }

    public void testEndTagFind()
    {
        String testHtml = "<SCRIPT>document.write(d+\".com\")</SCRIPT>";
View Full Code Here

    parser.registerScanners();
    parseAndAssertNodeCount(2);
    // The node should be an HTMLLinkTag
    assertTrue("Node should be a HTMLEndTag", node[1] instanceof EndTag);
    EndTag endTag = (EndTag) node[1];
    assertEquals("Raw String", "</HTML>", endTag.toHtml());
  }

  public void testEndTagFind() {
    String testHtml = "<SCRIPT>document.write(d+\".com\")</SCRIPT>";
    int pos = testHtml.indexOf("</SCRIPT>");
View Full Code Here

    assertStringEquals("first custom tag html", "<CUSTOM></CUSTOM>", customTag.toHtml());
    customTag = (CustomTag) node[1];
    assertStringEquals("first custom tag html", "<CUSTOM>something</CUSTOM>", customTag.toHtml());
    EndTag endTag = (EndTag) node[2];
    assertStringEquals("first custom tag html", "</CUSTOM>", endTag.toHtml());
  }

  public void testParentConnections() throws ParserException {
    createParser("<custom>" + "<custom>something</custom>" + "</custom>");
    parser.addScanner(new CustomScanner(false));
View Full Code Here

    CompositeTag parent = firstChild.getParent();
    assertNotNull("first child parent should not be null", parent);
    assertSame("parent and custom tag should be the same", customTag, parent);

    EndTag endTag = (EndTag) node[2];
    assertStringEquals("first custom tag html", "</CUSTOM>", endTag.toHtml());
    assertNull("end tag should have no parent", endTag.getParent());

  }

  public void testUrlBeingProvidedToCreateTag() throws ParserException {
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.