42 */
43 @Listeners({jaxp.library.FilePolicy.class})
44 public class IssueTracker35 {
45
46 @Test
47 public void testSkippingExternalDTD() throws Exception {
48 XMLInputFactory xif = XMLInputFactory.newInstance();
49 try(
50 InputStream is= getClass().getResourceAsStream("XMLSchema.xsd");
51 ) {
52 XMLStreamReader reader = xif.createXMLStreamReader(getClass().getResource("XMLSchema.xsd").getFile(), is);
53 int e;
54 while ((e = reader.next()) == XMLStreamConstants.COMMENT);
55
56 Assert.assertEquals(e, XMLStreamConstants.DTD, "should be DTD");
57 reader.nextTag();
58 Assert.assertEquals(reader.getLocalName(), "schema", "next tag should be schema");
59 }
60 }
61 }
62
|
42 */
43 @Listeners({jaxp.library.FilePolicy.class})
44 public class IssueTracker35 {
45
46 @Test
47 public void testSkippingExternalDTD() throws Exception {
48 XMLInputFactory xif = XMLInputFactory.newInstance();
49 try(
50 InputStream is= getClass().getResourceAsStream("XMLSchema.xsd");
51 ) {
52 XMLStreamReader reader = xif.createXMLStreamReader(getClass().getResource("XMLSchema.xsd").getFile(), is);
53 int e;
54 while ((e = reader.next()) == XMLStreamConstants.COMMENT);
55
56 Assert.assertEquals(e, XMLStreamConstants.DTD, "should be DTD");
57 reader.nextTag();
58 Assert.assertEquals(reader.getLocalName(), "schema", "next tag should be schema");
59 }
60 }
61 }
|