Hi Olivier, kpu <olivier.capuo...@gmail.com> wrote on 04/03/2010 04:32:26 PM:
> I wish grouped elements "by component". > I try create a <g> element and call > method getDOMTreeManager().appendGroup(element_g, getDomGroupManager()) You need to call 'getRoot(element_g)' this will append everything drawn since the graphics was constructed, or the last time getRoot was called as children of 'element_g'. > m1.draw(svgGenerator); svgGenerator.getRoot(g1); > m2.draw(svgGenerator); svgGenerator.getRoot(g2); > // Finally, stream out SVG to the standard output using > // UTF-8 encoding. You will need to manage the streaming of the SVG yourself. There are many options for this but two from Batik are batik.svggen.XmlWriter or I think a little better is bati.dom.DOMUtilities.