JAXB
suggest changeVersions
The original version list named Java SE 6, 7, 8, and 9 (Early Access).
Introduction
JAXB or Java Architecture for XML Binding (JAXB) is a software framework that allows Java developers to map Java classes to XML representations. This page will introduce readers to JAXB using detailed examples about its functions provided mainly for marshaling and un-marshaling Java Objects into XML format and vice-versa.
Syntax
- JAXB.marshal(object, fileObjOfXML);
- Object obj = JAXB.unmarshal(fileObjOfXML, className);
Parameters
| Parameter | Details |
|---|---|
| fileObjOfXML | File object of an XML file |
| className | Name of a class with .class extension |
Remarks
Using the XJC tool available in the JDK, Java code for an XML structure described in an XML schema (.xsd file) can be automatically generated, see XJC topic.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents