File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
core/src/main/java/io/github/project/openubl/xsender/files/xml Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1818
1919import org .xml .sax .SAXException ;
2020
21+ import javax .xml .XMLConstants ;
22+ import javax .xml .parsers .DocumentBuilderFactory ;
2123import javax .xml .parsers .ParserConfigurationException ;
2224import javax .xml .parsers .SAXParser ;
2325import javax .xml .parsers .SAXParserFactory ;
@@ -32,10 +34,14 @@ private XmlContentProvider() {
3234
3335 public static XmlContent getSunatDocument (InputStream is ) throws ParserConfigurationException , SAXException , IOException {
3436 XmlHandler handler = new XmlHandler ();
37+
3538 SAXParserFactory factory = SAXParserFactory .newInstance ();
39+ factory .setFeature ("http://apache.org/xml/features/disallow-doctype-decl" , true );
3640 factory .setNamespaceAware (true );
41+
3742 SAXParser parser = factory .newSAXParser ();
3843 parser .parse (is , handler );
44+
3945 return handler .getModel ();
4046 }
4147}
You can’t perform that action at this time.
0 commit comments