Example usage for Java org.jdom2 Document fields, constructors, methods, implement or subclass
The text is from its open source code.
Document(Element rootElement) This will create a new Document , with the supplied Element as the root element, and no DocType declaration. | |
Document(List extends Content> content) This will create a new Document , with the supplied list of content, and a DocType declaration only if the content contains a DocType instance. | |
Document() Creates a new empty document. | |
Document(Element rootElement, DocType docType) This will create a new Document , with the supplied Element as the root element and the supplied DocType declaration. |
Document | addContent(Content child) Appends the child to the end of the content list. |
Document | addContent(Collection extends Content> c) Appends all children in the given collection to the end of the content list. |
Document | addContent(int index, Content child) Inserts the child into the content list at the given index. |
Document | addContent(int index, Collection extends Content> c) Inserts the content in a collection into the content list at the given index. |
Document | clone() This will return a deep clone of this Document . |
Element | detachRootElement() Detach the root Element from this document. |
String | getBaseURI() Returns the URI from which this document was loaded, or null if this is not known. |
List | getContent() This will return all content for the Document . |
Content | getContent(int index) |
List | getContent(Filter Return a filtered view of this Document 's content. |
int | getContentSize() |
IteratorIterable | getDescendants(final Filter Returns an iterator that walks over all descendants in document order applying the Filter to return only elements that match the filter rule. |
IteratorIterable | getDescendants() Returns an iterator that walks over all descendants in document order. |
DocType | getDocType() This will return the DocType declaration for this Document , or null if none exists. |
Document | getDocument() Always returns this Document Instance |
List | getNamespacesInherited() |
Element | getRootElement() This will return the root Element for this Document |
boolean | hasRootElement() This will return true if this document has a root element, false otherwise. |
List | removeContent(Filter Remove all child content from this parent matching the supplied filter. |
boolean | removeContent(Content child) |
Content | removeContent(int index) |
Document | setContent(Collection extends Content> newContent) This sets the content of the Document . |
Document | setContent(Content child) Set this document's content to be the supplied child. |
Document | setDocType(DocType docType) This will set the DocType declaration for this Document . |
Document | setRootElement(Element rootElement) This sets the root Element for the Document . |
String | toString() This returns a String representation of the Document , suitable for debugging. |