You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by socke <so...@web.de> on 2006/01/17 16:14:17 UTC

svgz -> svg

hi there,

i have a *.svgz file and i want to draw on this file in a jsvgcanvas. but i need to convert it "back" into a svg to append dynamically new childnodes..

does anybody know if or how that goes?


thanks a lot
greetings 
steve

Re: svgz -> svg

Posted by th...@kodak.com.
sockensoldat@web.de wrote on 01/17/2006 10:14:17 AM:

> i have a *.svgz file and i want to draw on this file in a jsvgcanvas. 
but i 
> need to convert it "back" into a svg to append dynamically new 
childnodes.

   The Canvas will automatically decompress the svgz file before
displaying it.  There are two places one could append your new childnodes.
Probably the easiest is to add a SVGDocumentLoadEventListener to the 
canvas.
It's 'event' object includes the SVGDocument, so you can simply use the 
DOM
to append your nodes.

   You could also read the document yourself (using the 
SAXSVGDocumentFactory
which will automatically decompress as well) and then append your nodes 
and
call 'setSVGDocument' on the canvas.

> does anybody know if or how that goes?

   Hope that helps.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org