Summary
JDOM models an XML document as a Document object that contains a List of Comment and ProcessingInstruction objects and a single Element object for the root element.
Each Element object contains a List of its children: Comment, ProcessingInstruction, Text, and other Element objects. In addition, it has separate lists of attributes and additional namespaces. The list of children is accessible through the getContent() method. Content can be appended to an element or to a document with the heavily overloaded addContent() method, or removed from the tree using the heavily overloaded removeContent() method. Other mutation operations, such as inserting a node at the beginning or in the middle of an element's children, require using the methods ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access