Spoilt For Choice: How You Voted in the XML Library Poll

DZone 's Guide to

Spoilt For Choice: How You Voted in the XML Library Poll

· Java Zone ·
Free Resource

Last week I put together a poll to find out what people use to handle XML in their Java applications these days. Thanks to the participation of those who voted and left comments, I got a good picture of what libraries and techniques people are utilizing to handle XML in Java.

First to the poll results, from almost 800 people there was a wide variety of methods used. It seems that the days of DOM and SAX being the predominant choices are almost gone, with 39% of developers taking advantage of JAXB. 


Reading through the comments here it was great to see people taking advantages of other languages on the JVM for XML, such as Groovy and Scala.  Apart from those who used different languages like this, here is a complete list of other frameworks that you recommended for XML processing: 

  • dom4j
    Support for DOM, SAX and JAXP. Seems full featured to me
  • xstream
    Serialize to and from XML
    Fast, memory efficient XML processor 
  • Joost
    Implementation of Streaming Transformations for XML that builds on top of SAX.
  • SimpleXML
    Looks like a really straightforward way to handle XML. 
  • XMLBeans
    Useful XML binding-to-beans option
  • StAX
    Streaming API for XML implementation of the JSR-173 specification
  • JDOM
    A Java DOM implementation
  • Castor
    A reliable XML binding solution, with tools to generate objects from schemas, similar to JAXB.
  • Spring OXM
    Provides Object - XML mapping support.
  • Apache Digester
    Provides a configuration of an object-xml mapping module for reading and using XML configurations.
  • WAX
    Writing API for XML. Similar to SAX, except it allows writing back to XML.

That's a pretty comprehensive rundown of frameworks, and one which leads to a very valid point from one reader:

Seriously, people, where's this fascination in Java coming from? How many home-grown loggers, web frameworks, ORM solutions and XML parsers do we really need? 

On one hand, all of these frameworks can be a good thing - there's a lot of choice out there. But on the other hand, wouldn't it be overwhelming if you were to start working in Java and have all of these options presented to you, trying to work out which best suits your needs.  


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}