The content is stored as a java.util.List
which contains
One String
(soon to be Text
) object per text node
One Element
object per child element
One Comment
object per comment
One CDATA
object per CDATA section (Text
?)
One ProcessingInstruction
object per processing instruction
Use the regular methods of java.util.List
to
add, remove, and inspect the contents of an element
Since the methods of java.util.List
expect to work
with Object
objects, casting back to JDOM types
and String
is frequent
Various utility methods mean you don't always have to work with the full list.
Attributes and namespaces are available as separate lists since these are not children.