[hibernate-dev] cacheable files

Hardy Ferentschik hardy at hibernate.org
Fri Apr 15 12:28:58 EDT 2011


On Fri, 15 Apr 2011 18:06:47 +0200, Steve Ebersole <steve at hibernate.org>  
wrote:

> we are using stax now under the covers as well.
>
> These are just different models of jaxp parsing: dom, sax, stax.

Right, and the benefit of JAXB is the typed API.
It is very hard to find reliable sources for performance comparisons, but  
I find this blog
quite interesting -  
http://www.javarants.com/2006/04/30/simple-and-efficient-xml-parsing-using-jaxb-2-0/
It also shows again how JAXB relates to the different models of parsing as  
Steve mentioned.

The difference between StAX only and JAXB + StAX seems acceptable in the  
example. SAX seems to
be best performance wise, but it has also by far the worst API.

I can see that it can get tricky to handle all the generated JAXB classes  
if you
have many different document types, but I don't think that we have this  
problem in Hibernate.

I don't call myself an XML expert either, but so far I like JAXB best and  
also no bad experiences.

--Hardy



More information about the hibernate-dev mailing list