In this article, we will walk through marshalling data to and from XML, using a XML data-binding API. The first question is, why? Why not use SAX or DOM? Personally, when I sit down to work with XML, I get frustrated with the amount of code that you need to write to do simple things.
I came across JDOM and found it to be something I was looking for. DOM is built to be language-agnostic, and hence doesn't feel very "Java-like." JDOM does a great job in being DOM, in a way I would like to use it in Java.
For some applications, I don't want to even
Welcome to Processing XML with Java, a complete tutorial about writing Java programs that read and write XML documents. This is the most comprehensive and up-to-date book about integrating XML with Java (and vice versa) you can buy. It contains over 1000 pages of detailed information on SAX, DOM, JDOM, JAXP, TrAX, XPath, XSLT, SOAP, and lots of other juicy acronyms. This book is written for Java programmers who want to learn how to read and write XML documents from their code. The paper version is published by Addison-Wesley, and can be found at fine
How do I install the XPointer processor?
Download the latest "cweb-xpointer" release from SourceForge. This project uses Apache Maven and Java 1.4+, so you will need to install those as well. Normally you will also want to download one of the XPointer Framework integrations, such as the xpointer+dom4j or the xpointer+jdom package. These "integration packages" provide support for a specific XML Document model.
The project dependencies are explicitly declared in the Maven POM. This means that Maven can automagically download the required releases of