Data Binding - Java
XML data binding refers to the process of representing the information in an XML document as an object in computer memory. This allows applications to access the data in the XML from the object rather than using the DOM to retrieve the data from a direct representation of the XML itself.
An XML data binder accomplishes this by creating a mapping between elements of the XML schema of the document we wish to bind and members of a class to be represented in memory.
From : http://en.wikipedia.org/wiki/XML_data_binding
Zeus
Zeus is, in a nutshell, an open source Java-to-XML Data Binding tool. It provides a means of taking an arbitrary XML document and converting that document into a Java object representing the XML. That Java object can then be used and manipulated like any other Java object in the VM (virtual machine). Then, once the object has been modified and operated upon, Zeus can be used to convert the Java object back into an XML representation.
At the heart of the need for Zeus is the fact that lower level XML APIs like SAX (the Simple API for XML), DOM (the Document Object Model), and JDOM provide generic views of an XML document. For example, DOM and JDOM provide you a tree view of an XML document; however, a document that represents books is most easily worked with using methods like getBook(String title), rather than getElement(String name) and setContent(String content). By providing this higher level API, Zeus seeks to take even more mystery out of XML and make it simple to use, and accessible to all.
Core to the process of conversion between XML and Java is a set of constraints. These constraints specify how an XML document should be formatted, and what content in that document means semantically. These constraints cen be represented in the two most common standard formats today, DTDs and XML Schemas. In the future, Zeus will support emerging standards like Relax, and anything else that comes along. With these constraints, Zeus can generate Java classes that will represent any XML document conforming to the supplied constraints. Then, XML documents become instances of these constraints. What does all this mean to you? Well, it means that you can generate your classes and write your code ahead of time, and know that any XML document conforming to your constraints will work with your code, even months and years down the road. Additionally, Zeus provides a binding layer which sits between constraints and class generation. This means that you can interchange XML Schema, DTDs, and any other constraint mechanism at any time, and Zeus will happily go on plugging. This is because Zeus creates a set of generic bindings from constraints, and then generates classes from those bindings; this is in contrast to most binding frameworks today, which go directly from constraint to class.
visit
Zeus
Zeus was visited : 46 times
Loading .....