tags:

views:

72

answers:

5

Can you please recommend a fast XML Builder in Java that doesn't use annotations? Thanks.

+3  A: 

JAXB 2. You can use it without annotations, defining mappings in XML resources.

lexicore
If you don't like that format, the EclipseLink JAXB (MOXy) implementation has its own format, see http://wiki.eclipse.org/EclipseLink/Examples/MOXy/EclipseLink-OXM.XML
Blaise Doughan
+1  A: 

XMLEncoder. It is a standard Java class, simple, feature-poor way of serializing objects to XML.

Bozho
+1  A: 

Betwixt, from apache is pretty good for simple stuff. http://commons.apache.org/betwixt/

Charles
Is Betwixt still an active project? The latest release appears to be 0.8 and the release notes (http://commons.apache.org/betwixt/betwixt-0.8/RELEASE-NOTES.txt) are dated Dec 21, 2006.
Blaise Doughan
+1  A: 

Xstream is a better and faster framework. Its easier to learn as well.

chedine
A: 

How about StaxMate -- very light-weight, faster than object-mapper solutions (XStream or JAXB), still reasonably easy to use for many use cases.

Of course it really depends on whether by fast you mean time to write code (if so, XStream is probably the thing), or time to run it (in which case simple Stax/SAX wrapping writers, like StaxMate or XMLBuilder are the things); XStream is not particular fast, although it's not the slowest thing around.

StaxMan