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 18
18
19
19
import org .xml .sax .SAXException ;
20
20
21
+ import javax .xml .XMLConstants ;
22
+ import javax .xml .parsers .DocumentBuilderFactory ;
21
23
import javax .xml .parsers .ParserConfigurationException ;
22
24
import javax .xml .parsers .SAXParser ;
23
25
import javax .xml .parsers .SAXParserFactory ;
@@ -32,10 +34,14 @@ private XmlContentProvider() {
32
34
33
35
public static XmlContent getSunatDocument (InputStream is ) throws ParserConfigurationException , SAXException , IOException {
34
36
XmlHandler handler = new XmlHandler ();
37
+
35
38
SAXParserFactory factory = SAXParserFactory .newInstance ();
39
+ factory .setFeature ("http://apache.org/xml/features/disallow-doctype-decl" , true );
36
40
factory .setNamespaceAware (true );
41
+
37
42
SAXParser parser = factory .newSAXParser ();
38
43
parser .parse (is , handler );
44
+
39
45
return handler .getModel ();
40
46
}
41
47
}
You can’t perform that action at this time.
0 commit comments