Andreas Neumann wrote: > ASV, however, has one useful feature (available through an XML > processing instruction) that is currently not available on Batik: to > save the current state of the DOM to a new SVG file. Yes, there is the > DOM viewer to see the current DOM, but in some cases, it would be useful > to get the full modified DOM and to be able to save it to a file again.
Interesting.. we added this feature to our application's "debug menu" and it has proven very useful. The implementation is easy, something like: JSVGCanvas canvas = ... File file = ... canvas.getUpdateManager().getUpdateRunnableQueue().invokeAndWait( new Runnable() { public void run() { try { TransformerFactory.newInstance().newTransformer() .transform( new DOMSource(canvas.getSVGDocument()), new StreamResult(file)); } catch (Throwable t) { t.printStackTrace(). } } } ); -Archie __________________________________________________________________________ Archie Cobbs * CTO, Awarix * http://www.awarix.com * Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. * --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]