Re: Problems loading an SVG file to Document

Robert Marcano <[email protected]> Wed, 21 Aug 2013 18:04:38 -0430
Newsgroups gmane.text.xml.batik.user
Message-ID <[email protected]>
On 08/21/2013 12:27 PM, Mark Riley wrote:
> Im using the code:
>
> String parser = XMLResourceDescriptor.getXMLParserClassName();
>
> SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
>
> Document doc = f.createDocument(image.getFilename(), image.getStream());
>
> It seems parser returns null and my application crashes out.

Can you copy the stacktrace, because it is normal for 
getXMLParserClassName() to returns null, the default parser is the JRE 
included parser.

See:

http://svn.apache.org/viewvc/xmlgraphics/batik/tags/batik-1_7/sources/org/apache/batik/dom/util/SAXDocumentFactory.java?revision=608260&view=markup

Line 404


>
> Thanks,
>
> Mark
>