public XMLContentParser()

in src/main/java/org/apache/sling/contentparser/xml/internal/XMLContentParser.java [58:69]


    public XMLContentParser() {
        try {
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            dbf.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
            dbf.setAttribute(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
            dbf.setAttribute(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE);
            dbf.setExpandEntityReferences(false);
            documentBuilderFactory = dbf;
        } catch (IllegalArgumentException e) {
            throw new IllegalStateException("Cannot disable DTD features.", e);
        }
    }