Hi,

> Now if i have the whole SVG content in the form of a
> String or a StringBuffer, how will I load it in to
> JSVGCanvas or into the applet?

You can do this by parsing the String/StringBuffer into SVG DOM
Document, and then past that SVG DOM Document into JSVGCanvas.

Here is the example

// parse String into DOM Document
StringReader reader = new StringReader(stringBuffer.toString());
String parser = XMLResourceDescriptor.getXMLParserClassName();
SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
// do not forget the URI, even it is fake eg: c://svg/sample.svg
// this is specially important if your doc reference other doc 
// in relative URI
SVGDocument doc = f.createSVGDocument(uri,reader);

// set the doc to canvas
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