XML data binding

XML Data Binding (English XML databinding ) is in the process of object orientation of the mapping of XML documents to objects or in the representation of XML documents through objects and vice versa. This process allows programmers to access XML data via objects to control without complex mechanisms such as XPath, DOM or SAX.

Taking place at runtime an application image of an object into XML data are called while marshaling or serialization. The reverse path, the mapping of XML data into objects called unmarshalling or deserialization.

Operation

XML data binding must for imaging objects to XML and vice versa represent attributes of the objects to XML elements. This can be done depending on the task or support used by the XML binding framework on different ways:

All three methods can be implemented in different ways. For example, it is in some frameworks only possible to generate the required classes at runtime or even get along by Bytecodemanipulation without your own classes.

Problems

XML schemas and classes can not always be completely mapped to each other. For example, it is often difficult to map to each other in two possible comments. Moreover, it is often problematic to map the order of XML elements in classes, while self - references from objects to XML are difficult to map. Thus, it may be the case that the XML data of the bond is not taken into account all of the information elements to be bound. Modern XML data binding frameworks, however, are able to preserve the complete information.

Alternative

The alternative to XML data binding is to manually serialize and deserialize objects into XML documents by means of known XML technologies such as XPath, DOM or SAX. The main disadvantage of this alternative is the overhead of the necessary for this own implementation and the associated costs.

XML data binding frameworks

C and C

  • GSOAP - Open Source XML Data Binding compiler for C and C; supports SOAP, WSDL and XSD.
  • Code Synthesis XSD - Open Source XML Data Binding compiler for C , SAX or tree -like mapping to C classes.
  • Xmlbeansxx - C library for XML data binding. Similar to XMLBeans.

Java

  • Java Architecture for XML Binding ( JAXB ), Java API for XML Data Binding, part of JSE and JEE.
  • Castor - open source XML data binding framework
  • Apache XMLBeans - open source XML data binding framework, access to XML documents via XML generated from schema classes
  • JiBX - Fast open source XML data binding framework, mapping of classes from an XML schema on Bytecodemanipulation
  • XStream - open source XML data binding framework, even after Serializes JSON
  • Apache Commons Betwixt - Simples open source XML data binding framework Serializes objects to XML without XML Schema Definition

. Net

  • System.Xml.Serialization -. Portion of the NET Framework also contains XML data binding classes
18201
de