Java and XML Data Binding

Author: MacAllister
Publisher:
Publish Date: 2003-02-01
Features: The XML data binding tools discussed in this book allow you to directly convert from XML documents to Java objects and back. In Java, you can use objects in a simple and intuitive way that is specific to your business. Just call `employee.setName()` to replace the process of finding and modifying the `name` attribute of the `employee` element. Generating XML output is as simple as writing a file. Through data binding, you will finally be able to use Java instead of XML. This book shows you how to use the new XML data binding API. XML is an excellent tool for representing data. Although it is not yet perfect for data representation, we still need it. However, working directly with XML documents is clumsy. You have to use the structure of XML (such as elements and attributes) to navigate through the entire document. Programming at this hierarchical level is clumsy, and many programmers would not do it this way. The XML data binding tools discussed in this book allow you to directly convert from XML documents to Java objects and back. In Java, you can use objects in a simple and intuitive way that is specific to your business. Just call `employee.setName()` to replace the process of finding and modifying the `name` attribute of the `employee` element. Generating XML output is as simple as writing a file. Through data binding, you will finally be able to use Java instead of XML. This new book first defines the concept of data binding, then introduces all popular data binding toolkits: Sun's JAXBAPI and three other open-source code alternative implementations—Zeus, Castor, and Quick. The book provides practical information on effectively using data binding: what pitfalls to avoid, when to follow the rules, and how to use various packages to do what you want. XML is becoming a major part of application development. Thousands of developers are working to understand different XML structures and manipulate them using Java APIs. However, when you have to learn this completely new way of thinking, data binding provides XML data in a Java format; it also delivers data-centric information in a business-centric way; data binding explains obscure semantics in easy-to-understand, Java-based terms. Switching between XML and Java becomes very easy, and you will quickly forget that you are dealing with XML data. If you want to use XML effectively without spending months learning about entity references and ignoring spaces, then this book is perfect for you.

📌 Related Posts