xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frederich, Eric P21322" <eric.freder...@siemens.com>
Subject XML Help
Date Thu, 08 Nov 2007 22:41:58 GMT
Hello,

Is there a light-weight way to create an xml document in Java?
The following two lines take 2 full seconds.

DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
Document doc =
impl.createDocument(SVGDOMImplementation.SVG_NAMESPACE_URI, "svg",
null);

The first one takes about 1.5 seconds and the second takes about 0.5
seconds.

This is my first XML application so I don't know what the alternatives
are.
I am only going by the example that I saw on the batik web site.
I'm not doing anything complicated like querying the document after it
is created.
The most complicated thing I'm doing is setting an attribute of an
element returned from a different method before appending it to a group
element.

I don't need any kind of SVG DTD checking, the only thing I'm adding to
the XML are <g> and <path> elements.

So is there a solution that is more light-weight even if it isn't SVG
specific and just XML in general?

The problem is that this program will be run many times in batch mode
and I can't afford the 2 seconds every iteration.

Thanks,
~Eric

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


Mime
View raw message