File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
svg-core/src/main/java/com/kitfox/svg Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 62
62
import java .util .logging .Logger ;
63
63
import java .util .zip .GZIPInputStream ;
64
64
import javax .imageio .ImageIO ;
65
+ import javax .xml .parsers .ParserConfigurationException ;
66
+ import javax .xml .parsers .SAXParserFactory ;
65
67
import org .xml .sax .EntityResolver ;
66
68
import org .xml .sax .InputSource ;
67
69
import org .xml .sax .SAXException ;
68
70
import org .xml .sax .SAXParseException ;
69
71
import org .xml .sax .XMLReader ;
70
- import org .xml .sax .helpers .XMLReaderFactory ;
71
72
72
73
/**
73
74
* Many SVG files can be loaded at one time. These files will quite likely need
@@ -576,11 +577,13 @@ public URI getStreamBuiltURI(String name)
576
577
}
577
578
}
578
579
579
- private XMLReader getXMLReaderCached () throws SAXException
580
+ private XMLReader getXMLReaderCached () throws SAXException , ParserConfigurationException
580
581
{
581
582
if (cachedReader == null )
582
583
{
583
- cachedReader = XMLReaderFactory .createXMLReader ();
584
+ SAXParserFactory factory = SAXParserFactory .newInstance ();
585
+ factory .setNamespaceAware (true );
586
+ cachedReader = factory .newSAXParser ().getXMLReader ();
584
587
}
585
588
return cachedReader ;
586
589
}
You can’t perform that action at this time.
0 commit comments