trackeditor: ignore default surface dtd

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8343 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: f2d6265542d3e661d386b873fe271902397029a3
Former-commit-id: 75a931899b365ff36fe74103fc5ca8e43369b3fb
This commit is contained in:
iobyte 2022-07-29 22:19:02 +00:00
parent d3bb7c7db1
commit 86d40ffd99

View file

@ -94,6 +94,10 @@ public class XmlReader
"</section>" + "</section>" +
"</params>"; "</params>";
SAXBuilder sxb = new SAXBuilder(false); SAXBuilder sxb = new SAXBuilder(false);
sxb.setValidation(false);
sxb.setFeature("http://xml.org/sax/features/validation", false);
sxb.setFeature("http://apache.org/xml/features/nonvalidating/load-dtd-grammar", false);
sxb.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
Document doc = sxb.build(new InputSource(new StringReader(xml))); Document doc = sxb.build(new InputSource(new StringReader(xml)));
Element root = doc.getRootElement(); Element root = doc.getRootElement();
Element surfaces = getChildWithName(root, "Surfaces"); Element surfaces = getChildWithName(root, "Surfaces");