setNamespaceAware as true

This commit is contained in:
Looly
2020-03-25 10:41:36 +08:00
parent 9a68d4299f
commit 308368cffd
2 changed files with 3 additions and 0 deletions

View File

@@ -474,6 +474,8 @@ public class XmlUtil {
} else {
factory = DocumentBuilderFactory.newInstance();
}
// 默认打开NamespaceAwaregetElementsByTagNameNS可以使用命名空间
factory.setNamespaceAware(true);
return disableXXE(factory);
}