Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Generating JAXB classes
11-11-2013, 05:58 AM #1
- Join Date
- Nov 2013
- Thanked 0 Times in 0 Posts
Generating JAXB classes
My xml: http://www.javaexperience.com/catalog.xml
I have an xml for which I want to generate JAXB classes. Unfortunately I don't have access to xsd for this xml.
Could someone please share steps to generate JAXB classes for a xml. What I have tried is:
1) Generate the xsd from this xml using XML to XSD Generater Online - xmlGrid.net
2) Use the Maven JAXB plugin "org.jvnet.jaxb2_commons"
The problem I faced with my approach was that:
Since the xml has root element and one of the child element as same name, the JAXB processor fails on reaching the child "Catalog" tag. Even though it had successfully processed the root "Catalog" tag.
Any pointers would of great help.