Prev Next

Java / JAXB

Steps involved in JAXB marshaling or Java object to XML conversion.

  • Create POJO class and add JAXB annotations. Annotate with @XmlRootElement @XmlAccessorType and annotate all fields with @XmlElement. This will bind Object properties to XML elements.
  • Create the JAXBContext object.
  • Create the Marshaller objects.
  • Create the content tree by using set method.
  • Invoke the marshal method.

More Related questions...

Show more question and Answers...

JMS

Comments & Discussions