Package org.htmlparser.tags

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


            node[0] instanceof DoctypeTag);
        DoctypeTag docTypeTag = (DoctypeTag) node[0];
        assertStringEquals(
            "toHTML()",
            "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">",
            docTypeTag.toHtml());
    }
}
View Full Code Here


        createParser(testHTML);
        parseAndAssertNodeCount(4);
        // The first node should be an DoctypeTag
        assertTrue("First node should be a DoctypeTag",node[0] instanceof DoctypeTag);
        DoctypeTag docTypeTag = (DoctypeTag)node[0];
        assertStringEquals("toHTML()","<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">",docTypeTag.toHtml());
    }

    /**
     * See bug #833592 DOCTYPE element is not parsed correctly
     * Contributed by Trevor Watson (t007).
View Full Code Here

    parser.registerScanners();
    parseAndAssertNodeCount(9);
    // The node should be an HTMLLinkTag
    assertTrue("Node should be a HTMLDoctypeTag", node[0] instanceof DoctypeTag);
    DoctypeTag docTypeTag = (DoctypeTag) node[0];
    assertStringEquals("toHTML()", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">", docTypeTag.toHtml());
  }
}
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.