content
Store the contents of the document as a lazily created
List
Serializable
, Cloneable
, Branch
, Document
, Node
DOMDocument
DefaultDocument
is the default DOM4J default implementation of
an XML document.
List
private DocumentType
private DocumentFactory
private EntityResolver
private String
private Element
encoding
DEFAULT_CONTENT_LIST_SIZE
NODE_TYPE_NAMES
ANY_NODE, ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, MAX_NODE_TYPE, NAMESPACE_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, UNKNOWN_NODE
DefaultDocument(String name)
DefaultDocument(String name,
Element rootElement,
DocumentType docType)
DefaultDocument(DocumentType docType)
DefaultDocument(Element rootElement)
DefaultDocument(Element rootElement,
DocumentType docType)
addDocType(String docTypeName,
String publicId,
String systemId)
protected void
protected void
void
Node
instances this branch may contain.clone()
clone
will return a deep clone or if this node is
read-only then clone will return the same instance.protected DocumentFactory
getName()
getName
returns the name of this node.Element
for this document.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.processingInstruction(String target)
processingInstructions(String target)
protected boolean
removeNode(Node node)
boolean
removeProcessingInstruction(String target)
protected void
rootElementAdded(Element element)
void
setContent(List<Node> content)
List
of
Node
instances.void
setDocType(DocumentType docType)
void
setDocumentFactory(DocumentFactory documentFactory)
void
setEntityResolver(EntityResolver entityResolver)
void
UnsupportedOperationException
if it is read-only.accept, add, addComment, addElement, addElement, addElement, addProcessingInstruction, addProcessingInstruction, asXML, asXPathResult, checkAddElementAllowed, childAdded, childRemoved, getDocument, getNodeType, getPath, getStringValue, getUniquePath, normalize, remove, setRootElement, setXMLEncoding, toString, write
add, add, add, addElement, appendContent, content, contentRemoved, createContentList, createContentList, createEmptyList, createResultList, createSingleResultList, elementByID, elementID, getContentAsStringValue, getContentAsText, getText, getTextTrim, hasContent, indexOf, invalidNodeTypeAddException, isReadOnly, node, nodeCount, nodeIterator, remove, remove, remove, setProcessingInstructions
createPattern, createXPath, createXPathFilter, createXPathResult, detach, getNodeTypeName, getParent, getPath, getUniquePath, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setParent, setText, supportsParent, valueOf
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, add, add, appendContent, content, elementByID, indexOf, node, nodeCount, nodeIterator, remove, remove, remove, setProcessingInstructions
createXPath, detach, getNodeTypeName, getParent, getPath, getText, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setParent, setText, supportsParent, valueOf
List
Node
getName
returns the name of this node. This is the XML
local name of the element, attribute, entity or processing instruction.
For CDATA and Text nodes this method will return null.
getName
in interface Node
getName
in class AbstractNode
Node
Sets the text data of this node or this method will throw an
UnsupportedOperationException
if it is read-only.
setName
in interface Node
setName
in class AbstractNode
name
- is the new name of this nodeDocument
Element
for this document.Document
Document
docType
- DOCUMENT ME!Document
docTypeName
- is the name of the root elementpublicId
- is the PUBLIC URIsystemId
- is the SYSTEM URIDocument
instance.Document
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.
The way this encoding is retrieved also depends on the way the XML source
is parsed. For instance, if the SAXReader is used and if the underlying
XMLReader implementation support the
org.xml.sax.ext.Locator2
interface, the result returned by
this method is specified by the getEncoding()
method of
that interface.getXMLEncoding
in interface Document
getXMLEncoding
in class AbstractDocument
null
if unknown.Document
Document
entityResolver
- DOCUMENT ME!Node
clone
will return a deep clone or if this node is
read-only then clone will return the same instance.
clone
in interface Node
clone
in class AbstractNode
Branch
Branch
target
- DOCUMENT ME!Branch
target
- DOCUMENT ME!Branch
target
- DOCUMENT ME!Branch
List
of
Node
instances.content
- is the list of nodes to use as the content for this branch.Branch
Node
instances this branch may contain.AbstractBranch
contentList
in class AbstractBranch
addNode
in class AbstractBranch
addNode
in class AbstractBranch
removeNode
in class AbstractBranch
AbstractDocument
rootElementAdded
in class AbstractDocument
element
- DOCUMENT ME!getDocumentFactory
in class AbstractNode