Package org.htmlparser.tags

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


    createParser("<meta name=\"foo\" content=\"foo>\nbar\">");
    if (1.4 <= Parser.getVersionNumber()) {
      parseAndAssertNodeCount(1);
      assertType("should be Tag", Tag.class, node[0]);
      Tag tag = (Tag) node[0];
      String html = tag.toHtml();
      assertStringEquals("html", "<META CONTENT=\"foo>\r\nbar\" NAME=\"foo\">", html);
      String attribute1 = tag.getAttribute("NAME");
      assertStringEquals("attribute 1", "foo", attribute1);
      String attribute2 = tag.getAttribute("CONTENT");
      assertStringEquals("attribute 2", "foo>\r\nbar", attribute2);
View Full Code Here


    createParser("<meta name=\"foo\" content=\"<foo\nbar\"");
    if (1.4 <= Parser.getVersionNumber()) {
      parseAndAssertNodeCount(1);
      assertType("should be Tag", Tag.class, node[0]);
      Tag tag = (Tag) node[0];
      String html = tag.toHtml();
      assertStringEquals("html", "<META CONTENT=\"<foo\r\nbar\" NAME=\"foo\">", html);
      String attribute1 = tag.getAttribute("NAME");
      assertStringEquals("attribute 1", "foo", attribute1);
      String attribute2 = tag.getAttribute("CONTENT");
      assertStringEquals("attribute 2", "<foo\r\nbar", attribute2);
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.