|
|
|
@ -66,10 +66,9 @@ public class MobileDeviceManagementUtil {
|
|
|
|
|
public static Document convertToDocument(File file) throws DeviceManagementException {
|
|
|
|
|
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
|
|
|
|
factory.setNamespaceAware(true);
|
|
|
|
|
factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
|
|
|
|
|
factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
|
|
|
|
|
try {
|
|
|
|
|
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
|
|
|
|
|
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
|
|
|
|
|
DocumentBuilder docBuilder = factory.newDocumentBuilder();
|
|
|
|
|
return docBuilder.parse(file);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|