Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Looks like your parser fetching dtd from "<a href="http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" rel="nofollow">http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd</a>" </p> <p>You can manually fetch that URL, store it as local file and than set custom handler, where can do dtd resolving.</p> <p>I wrote some code, as example.</p> <pre><code>@Test public void testParser() throws Exception { // Initialize SAX components Long startTime = System.currentTimeMillis(); SAXParserFactory spf = SAXParserFactory.newInstance(); SAXParser saxParser = spf.newSAXParser(); File f = new File("/home/grigory/test.svg"); saxParser.parse(new FileInputStream(f), new MyHandler()); System.out.println("execution time: " + (System.currentTimeMillis() - startTime)); } private static class MyHandler extends DefaultHandler { @Override public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException { System.out.println("resolve: "+ systemId); InputStream is = new FileInputStream("/home/grigory/svg10.dtd"); return new InputSource(is); } @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { System.out.println("start element '" + qName + "'"); super.startElement(uri, localName, qName, attributes); } @Override public void warning(SAXParseException e) throws SAXException { System.out.println(e.getMessage()); super.warning(e); } @Override public void error(SAXParseException e) throws SAXException { System.out.println(e.getMessage()); super.error(e); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload