@Test public void testCreateBasicInputFactory() throws Exception { XMLInputFactory factory = XmlUtils.createBasicInputFactory(); factory.setXMLResolver(new XMLResolver() { @Override public Object resolveEntity(String publicID, String systemID, String baseURI, String namespace) throws XMLStreamException { Assert.assertFalse("DTD should not be resolved.", "http: return null; } }); XMLStreamReader reader = factory.createXMLStreamReader(new StringReader("<!DOCTYPE foo SYSTEM \"http: while(reader.hasNext()) { reader.next(); } }
public static XMLInputFactory createBasicInputFactory() { XMLInputFactory xmlFactory = XMLInputFactory.newInstance(); xmlFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false); return xmlFactory; }
XmlUtils { public static XMLInputFactory createBasicInputFactory() { XMLInputFactory xmlFactory = XMLInputFactory.newInstance(); xmlFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false); return xmlFactory; } }
XmlUtils { public static XMLInputFactory createBasicInputFactory() { XMLInputFactory xmlFactory = XMLInputFactory.newInstance(); xmlFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false); return xmlFactory; }  }
XmlUtils { public static XMLInputFactory createBasicInputFactory() { XMLInputFactory xmlFactory = XMLInputFactory.newInstance(); xmlFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false); return xmlFactory; }  static XMLInputFactory createBasicInputFactory(); }
XmlUtils { public static XMLInputFactory createBasicInputFactory() { XMLInputFactory xmlFactory = XMLInputFactory.newInstance(); xmlFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false); return xmlFactory; }  static XMLInputFactory createBasicInputFactory();  }