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 dao <da...@gmail.com> on 2011/09/08 01:18:53 UTC

getting SVG after the script is applied

hello,

I have a SVG with a script like below (*the first code*). as you can see,
there is a script that modifies the svg at loading complete.
Is there a way to get the SVG without the script as it is after
flightwatchingInit has been executed (*the result code*)?

*the first code*

<?xml version="1.0" encoding="UTF-8"?>
<svg ... onload=";flightwatchingInit(evt)" >

<text id="theUTC" x="250" y="150">MESSAGE</text>


<script><![CDATA[

function flightwatchingInit() {

elt = document.getElementById("theUTC");

elt.replaceChild(document.createTextNode("02:42:15"), elt.firstChild);

}

]]></script>

</svg>

*the result code*
*

<?xml version="1.0" encoding="UTF-8"?>
<svg ... onload=";flightwatchingInit(evt)" >

*

*

<text id="theUTC" x="250" y="150">02:42:15</text>

*

*

 </svg>

*
-- 
Dao Hodac