Java org.dom4j Document fields, constructors, methods, implement or subclass

Example usage for Java org.dom4j Document fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.dom4j Document.

The text is from its open source code.

Method

voidadd(Node node)
Adds the given Node or throws IllegalAddException if the given node is not of a valid type.
DocumentaddComment(String comment)
Adds a new Comment node with the given text to this branch.
DocumentaddDocType(String name, String publicId, String systemId)
Adds a DOCTYPE declaration to this document
ElementaddElement(String name)
Adds a new Element node with the given name to this branch and returns a reference to the new node.
ElementaddElement(String qualifiedName, String namespaceURI)
Adds a new Element node with the given qualified name and namespace URI to this branch and returns a reference to the new node.
DocumentaddProcessingInstruction(String target, String text)
Adds a processing instruction for the given target
DocumentaddProcessingInstruction(String target, Map data)
Adds a processing instruction for the given target
voidclearContent()
Clears the content for this branch, removing any Node instances this branch may contain.
Listcontent()
Returns the content nodes of this branch as a backed List so that the content of this branch may be modified directly using the List interface.
DocumentTypegetDocType()
DOCUMENT ME!
EntityResolvergetEntityResolver()
DOCUMENT ME!
ElementgetRootElement()
Returns the root Element for this document.
StringgetXMLEncoding()
Return the encoding of this document, as part of the XML declaration This is null when unspecified or when it is not known (such as when the Document was created in memory) or when the implementation does not support this operation.
Nodenode(int index)
Returns the Node at the specified index position.
intnodeCount()
Returns the number of Node instances that this branch contains.
IteratornodeIterator()
Returns an iterator through the content nodes of this branch
voidnormalize()
Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes.
ListprocessingInstructions()
Returns a list of all the processing instructions in this branch.
booleanremove(Node node)
Removes the given Node if the node is an immediate child of this branch.
booleanremoveProcessingInstruction(String target)
Removes the processing instruction for the given target if it exists
voidsetDocType(DocumentType docType)
Sets the DocumentType property
voidsetProcessingInstructions(List listOfPIs)
Sets all the processing instructions for this branch
voidsetRootElement(Element rootElement)
Sets the root element for this document
voidsetXMLEncoding(String encoding)
Sets the encoding of this document as it will appear in the XML declaration part of the document.