Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What to use instead of XMLBeans now that it has been retired?

Tags:

I am starting a new project where I have third party XSD. My Java application needs to generate, and readm XML messages that conform to this XSD. In the past I have used Apache XMLBeans for this. It looks like XMLBeans has been retired.

What is a good replacement for XMLBeans now that it has been retired? I have used XStream on other projects but I don't recall that XStream has the ability to generate Java classes from an XSD so I am thinking that it is not a good choice over XMLBeans for this use case. I have hundreds of types defined in the XSD and would really prefer not to have to create the hundreds of Java classes to represent them in Java by hand.

In other words, using the XStream example, I have a Person type (and 99 others) defined in the XSD. Using XMLBeans I can generate the Java classes to represent these objects, but using XStream I would need to create the Java classes (e.g. Person) by hand or using some other tool. What tool should I use in this case?

like image 685
John Avatar asked Jan 01 '15 00:01

John


1 Answers

Have you looked at JAXB? I haven't done anything with either of these, but googling for "alternative to XMLBeans" brings up lots of references to this package. Here's an article that compares them...

http://blog.bdoughan.com/2012/01/how-does-jaxb-compare-to-xmlbeans.html

like image 61
Steve Avatar answered Oct 30 '22 08:10

Steve