Java Architecture for XML Binding (JAXB) - Important tags
JAXB is a standard for mapping POJOS to XML. It mainly does 2 tasks: Binding the Java data types to equivalent XSD types. By annotating Java class with JAXB annotations, Java objects can be converted to XML documents(Marshalling) and XML docs can be converted back to java objects(Unmarshalling). Below are some of the useful tags which can be handy in many scenarios.. @XmlRootElement(name = "Catologue") - Maps the class to a Root element of the generated XML <?xml version="1.0" encoding="UTF-8"?> <Catalogue> </Catalogue> @XmlType(name = "CatalogueDataType") - Binds/Maps the class to a Schema type <xs:complexType name="CatalogueDataType"> <xs:sequence> ....... </xs:sequence> </xs:complexType> @XmlType(propOrder = {"name", "products"}) - Order in which the properties of a class appear in XML <Catalogue> <name></n...