As soon as the JAXB has built classes that represent an XML document, it is a simple matter to use them. The operations that make XML processing complete include:
Reading an XML document
Modifying an XML document (adding, removing, and updating nodes)
Writing an XML document
Recall from earlier in the chapter that the process of building a Java object representation of an XML document in JAXB terms is referred to as unmarshalling. Therefore, the process for reading an XML document that adheres to the chosen DTD is to call the Java class representing the root node's unmarshal() method.
In the example, the root node is <books> and is represented by the Books class. The Books class has four unmarshal() ...