diff --git a/single-line-diagram-core/src/main/java/com/powsybl/sld/util/DomUtil.java b/single-line-diagram-core/src/main/java/com/powsybl/sld/util/DomUtil.java index 3394a61ed..c46758001 100644 --- a/single-line-diagram-core/src/main/java/com/powsybl/sld/util/DomUtil.java +++ b/single-line-diagram-core/src/main/java/com/powsybl/sld/util/DomUtil.java @@ -10,7 +10,6 @@ import com.powsybl.commons.exceptions.UncheckedTransformerException; import org.w3c.dom.Document; -import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; @@ -33,8 +32,6 @@ private DomUtil() { public static DocumentBuilder getDocumentBuilder() { try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - dbf.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); - dbf.setAttribute(XMLConstants.ACCESS_EXTERNAL_SCHEMA, ""); return dbf.newDocumentBuilder(); } catch (ParserConfigurationException e) { throw new UncheckedParserConfigurationException(e); @@ -46,8 +43,6 @@ public static void transformDocument(Document document, Writer writer) { DOMSource source = new DOMSource(document); StreamResult result = new StreamResult(writer); TransformerFactory transformerFactory = TransformerFactory.newInstance(); - transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); - transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); Transformer transformer = transformerFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");