>>>>> "RD" == renaud dol <[EMAIL PROTECTED]> writes:

RD> I used api java to generate svg from chart components and I get
RD> svg file corresponding.  

    Are you using the svggen.SVGGraphics classes to get the SVG
document?

RD> Now I would like to add javascript from the svg file generated, by
RD> using batik project api, but I don't know the procedure to follow
RD> and which class to use.  May you help me and have you got any
RD> examples to show me how to manipulate svg comportment with batik
RD> api?

    If you are using the svggen package, you can get the document as a
DOM tree.  The DOM provides methods to add new elements to the
document.  You probably want to add a script element with a CData
child node that contains the java script.

    You can also retrieve nodes from the Document using methods like
'SVGDocument.getElementById(String)' and add script attributes like
'onload', 'onclick' etc.

    There are lots of examples of using the DOM interface on the Net,
and if you search the archives of this mail-list you should see
several examples of how to get the DOM tree from the SVGGraphics, so
you can modify it and then write it out.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to