Hi all:
Once a SVG file(.svg) is generated,can the user modify the SVG file via
script event? So the next time when the svg file is displayed,the user
will not need to modify the svg file anymore.
Eg. There is a rect displayed on the svg browser, and then the user
dragged the rect to another place
;
Element scriptCode = doc.createTextElement("function showDialog() { \n
alert('msg'); })");
script.appendChild(scriptCode);
svg.appendChild(script);
Actually, it is better practice to put your code in a CDATA section
and use the createCDATASection method to do so.
I hope this helps,
Regards,
Vi
Hi,all:
I try to create a SVG DOM object via batik api.
The SVG DOM should be look like this:
//
http://www.w3.org/2000/svg"; width="400" height="450">
function showDialog(msg) {
alert(msg);
}
//
it is easy to create the "rect" element to