Hi Raks, For most browsers, you need to use an XMLSerializer object:
var s = new XMLSerializer(); var xmlString = s.serializeToString(node); Where node is the node you'd like to serialize. IE has historically had a different XML serialization API. In IE6-8, you instead do: var xmlString = node.xml; I'm not sure how this is currently handled in IE9. It's also possible to serialize DOM nodes under Rhino in Apache Batik. To do so, you need to use Java API's. As a point of reference, there is code that implements serialization and parsing of XML documents, on all of the above platforms, here: https://svn.apache.org/repos/asf/commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/util/xml/ Cheers, Jake On Mon, Feb 21, 2011 at 7:51 AM, Raks A <[email protected]> wrote: > > > > Hi, > > I am changing the SVG content with javascript and after the changes I want > to get the changed svg in a text file the way I can do innerHTML for HTML > I tried textContent but that does not seem to work > > Any ideas how can I get the SVG text so that I can save my svg file created > with javascript > > - Raks > > [Non-text portions of this message have been removed] > > ------------------------------------ ----- To unsubscribe send a message to: [email protected] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ----Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

