Hi Cory, I'm not sure if this is what you're looking for, but here was some code I used to get an svg DOM out to a file:
import org.w3c.dom.Document; import java.io.PrintWriter; import java.io.OutputStreamWriter; import org.apache.batik.dom.util.DOMUtilities; ...skipping a bit... public static void outputSVGDOM(Document doc) { if (doc == null) { log.debug("Document is null."); return; } PrintWriter out = null; try { out = new PrintWriter(new OutputStreamWriter(System.out,"UTF8")); log.debug("***********THE SVG DOC doc*************"); DOMUtilities.writeDocument(doc, out); out.flush(); log.debug("\n***********end printing DOM***********"); out.close(); } catch (Exception e) { log.debug("Error creating output stream"); log.debug(e.getMessage()); System.exit(1); } } It might be inelegant, but it works. -Randy -----Original Message----- From: Cory Sanoy [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 2:03 AM To: 'Batik Users' Subject: Transcoding from SVG to SVG I am attempting to save the DOM as an SVG file. I've tried to use the Transcoder but it seems to strip out the DOCTYPE tag and renders the outputed document unreadable by Batik. Is there a better way to output the DOM to an XML file? Are there TranscoderHints that must be set up in order to transcode the DOM to an XML file? Thanks, /Cory --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]