John Greene wrote:
John Greene wrote:
I have an object of class SVGDocument.
I want to stream it to a file.
How do you turn an SVGDocument object into an SVG file?
(no joy with SVGGraphics2D so far.)
Hi John,
Check out batik.dom.util.XMLUtilities.writeNode
or batik.svggen.XMLWriter
I'm using Batik-1.5
I see no *XMLUtilities* class in the *org.apache.batik.dom.util* package
(There's a* DOMUtilities* class, with a *writeDocument* method (and a
*writeNode* method which I have yet to experiment with), which generated
some code that looked nice but the Squiggle viewer refused to accept so
I suppose it was invalid SVG).
I also see no *XMLWriter* class in my *org.apache.batik.svggen* package.
What library are you using?
Sorry if you spent some time hunting, I was going from memory.
DOMUtilities is the class I was thinking of from dom.util (and
writeDocument is probably better than writeNode).
What is Squiggle's complaint? Can you provide a sample file? It's
possible the SVGDocument is invalid to start with or more likely
some things like the xmlns attributes are missing
(things not really needed for DOM but needed for Xml).
There _is_ an XmlWriter class in batik.svggen (case was wrong in my
first response).
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]