use of org.w3c.dom.DocumentType in project webservices-axiom by apache.
the class TestWithParser1 method runTest.
protected void runTest() throws Throwable {
Document document = dbf.newDocumentBuilder().parse(TestWithParser1.class.getResource("test1.xml").toString());
DocumentType doctype = document.getDoctype();
assertEquals("root", doctype.getName());
assertNull(doctype.getPublicId());
assertNull(doctype.getSystemId());
assertEquals("<!ELEMENT root (#PCDATA)>", doctype.getInternalSubset().trim());
}
use of org.w3c.dom.DocumentType in project webservices-axiom by apache.
the class TestWithParser2 method runTest.
protected void runTest() throws Throwable {
Document document = dbf.newDocumentBuilder().parse(TestWithParser2.class.getResource("test2.xml").toString());
DocumentType doctype = document.getDoctype();
assertEquals("root", doctype.getName());
assertEquals("dummy", doctype.getPublicId());
assertEquals("test.dtd", doctype.getSystemId());
assertNull(doctype.getInternalSubset());
}
Aggregations