*/
@Test
public void parseWithDtdShouldWork() throws IOException {
final InputStream xmlDocumentInputStream = new ByteArrayInputStream(TestXMLUtil.XML_DOCUMENT.getBytes());
final InputStream dtdDocumentInputStream = new ByteArrayInputStream(TestXMLUtil.DTD_DOCUMENT.getBytes());
final LSResourceResolver resourceResolver = new LSResourceResolver() {
public LSInput resolveResource(final String type, final String namespaceURI, final String publicId,
final String systemId, final String baseURI) {
if (TestXMLUtil.STATED_PUBLIC_ID.equals(publicId)) {
return DomUtil.createLSInput(dtdDocumentInputStream, TestXMLUtil.STATED_PUBLIC_ID,
TestXMLUtil.STATED_SYSTEM_ID);