XML外部实体注入:在此行显示错误DocumentBuilderFactory.newInstance()。newDocumentBuilder()。parse(new InputSource(sr));

时间:2019-01-22 07:07:27

标签: java xml

URL configurlURL = new URL(configurl.toString()); // validate
String domainConfig = get(configurl.toString(), headers, null);

// find and get the schema file from the reference url
Document doc = null;
try (StringReader sr = new StringReader(domainConfig)) {
    doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(sr));
}

0 个答案:

没有答案