How to create a Document object?
The following example show you how to create a simple
Document object in JDOM. We can create a new document directly by creating a new instance of the
Document class, for additional information we can pass an
Element as an argument.
To create a
Document from an existing XML file we can use the
SAXBuilder. Beside reading from file we can also build a
Document from stream and URL.