Mukt: > Hi, I am using Batik Library to render SVG File to my Application panel. This > can be easily done by using setURI(string URL) method of JSVGCanvas. But the > problem is I can't find any functionality that loads the SVG Image from Byte > Stream in the memory. > If I have the SVG file in my memory then I have to dump it into any > temporary file...and then read it using the above function..which I dont > want to do ..because it will decrease my program's efficiency...can ne1 help > me??
You can build an SVGDocument object from a Reader using the SAXSVGDocumentFactory class: http://xmlgraphics.apache.org/batik/using/dom-api.html#createdocfromsvgfile Instead of using the SAXSVGDocumentFactory.create(String) method, as in that example, you use SAXSVGDocumentFactory.create(Reader), and pass in a StringReader that wraps your String containing the XML. -- Cameron McCormack, http://mcc.id.au/ xmpp:[EMAIL PROTECTED] ▪ ICQ 26955922 ▪ MSN [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]