||Generating an XML Document with JAXB|
|Subject:||JAXB1.4 | Root element of the schema is not created|
Response to: JAXB1.4 | Root element of the schema is not created
To marshall, we need to follow the following steps:
1. Create a JAXBContext object and use this object to create a Marshaller object.
2. Create an ObjectFactory object to create instances of relevant generated Java content classes.
3. Using the ObjectFactory object, create an object tree with RootType as the root object. Populate these tree objects with relevant data using the appropriate setter methods.
4. Create a JAXBElement<<i>RootType> object from CatalogType object. JAXBElement<<i>RootType> represents catalog element in XML document.
Showing messages 1 through 1 of 1.