- // Spot check one of the attributes\r
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r
- DocumentBuilder builder = factory.newDocumentBuilder();\r
- Document doc = builder.parse(new ByteArrayInputStream(xmlFromJson.getBytes()));\r
- NodeList nodeList = doc.getDocumentElement().getChildNodes();\r
+ // Spot check one of the attributes\r
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r
+ factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);\r
+ DocumentBuilder builder = factory.newDocumentBuilder();\r
+ Document doc = builder.parse(new ByteArrayInputStream(xmlFromJson.getBytes()));\r
+ NodeList nodeList = doc.getDocumentElement().getChildNodes();\r