Hi,

> I see that the JSVGCanvas class has a "setURI" method to fetch an SVG from
> some URI.  However, I have an SVG document in a String... I just want to
> give this SVG string to the JSVGCanvas and have it display it.  How should
> I accomplish this?

Here is the example
StringReader reader = new StringReader(someString);
try {
        String parser = XMLResourceDescriptor.getXMLParserClassName();
        SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
        doc = f.createSVGDocument(baseDocumentURI,reader);
} catch (Exception ex) { }
jsvgCanvas.setDocument(doc);            

Regards
Tonny Kohar
-- 
Sketsa 
SVG Graphics Editor
http://www.kiyut.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to