xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Helder Magalhães" <helder.magalh...@gmail.com>
Subject Re: adding a <g> element generates a <svg> , creating a two <svg> into a single file
Date Thu, 13 Nov 2008 09:52:55 GMT
> SO, I wanted to know what part of my code I have to change, for import only
> a "g" element.

Did you mean to append only a "g" element?

This seems to be a general DOM question. Although I don't have
expertize using Batik's facilities, I'd suggest something like the
following (untested code):

Element newGroup = root.createElementNS(null, "g");
newGroup.setAttributeNS(null, "transform", TRANSFORM_GOES_HERE);

Note that you are currently using DOM level 1 methods - using DOM
level 2 methods (*NS) is a good practice [1].

Hope this helps,

 Helder Magalhães

[1] http://jwatt.org/svg/authoring/#namespace-aware-methods

To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org

View raw message