What is XML data binding?

Chandra Patni

XML data binding is a concept of generating Java classes (source code) from XML schema languages. Objects of such generated classes may represent XML document which validates against the schema. Such mapping of XML schema to Java classes and XML data to Java objects is called XML data binding.
JSR 00031, also known as project Adelard provides specification of such facility. It is done by providing by providing a schema in question and a data binding schema and compiling them into Java source code. The generated code contains getters, setters and methods for marshalling, unmarshalling and validation.
The Data binding schema can be used to fine-tune the class generation code. Adelard provides provision for generating a default data binding schema from the schema in question.