ANY_NODE, IS_COMMENT, IS_ELEMENT, IS_EMPTY_ELEMENT, IS_IGNORABLE_TEXT, IS_TEXT| Constructor | Description |
|---|---|
Document() |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
canAddChild(Child child) |
Returns
true when a child can be added. |
Document |
clone(boolean recurse) |
Return a clone of this node.
|
boolean |
deepEquals(Node node) |
Return true when this node and its descendants equals other node hierarchy.
|
void |
doAddChild(Child child) |
Implementation.
|
void |
doRemoveChild(Child child) |
Implementation.
|
java.util.List<AbstractChild> |
getChildren() |
|
Document |
getDocument() |
|
Element |
getRootElement() |
Returns the root element of this node.
|
static Element |
getRootElement(Document document) |
Returns the root element of a document.
|
NodeType |
getType() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddChild, addChildren, addChildren, addElement, changeComments, changeComments, changeNamedTexts, changeNamedTexts, changeTexts, changeTexts, getChild, getChild, getChildAt, getChildAt, getChildAt, getChildren, getChildren, getChildrenCount, getChildrenCount, getChildrenCount, getComments, getElementNamed, getElementNamedAt, getElementNamedIgnoreCase, getElementNamedIgnoreCaseAt, getElementNamedWithAttribute, getElements, getElementsNamed, getElementsNamedIgnoreCase, getLastChild, getTexts, hasChildren, hasChildren, hasChildren, hasComments, hasElements, hasTexts, mergeComments, mergeComments, mergeTexts, mergeTexts, removeChild, removeChildAt, removeChildren, removeChildren, removeChildren, removeComments, removeComments, removeElementsNamed, removeElementsNamed, removeIgnorableTexts, removeIgnorableTexts, removeTexts, removeTexts, sortChildren, sortChildrenpublic Document clone(boolean recurse)
Nodepublic boolean deepEquals(Node node)
NodeParents are ignored.
deepEquals in interface Nodenode - The other node to compare.public Document getDocument()
getDocument in interface Nodepublic Element getRootElement()
Node
If this node is a document, then this is its unique child element, possibly null.
If this node is a child, then this is the highest ancestor that is an element, possibly null.
getRootElement in interface Nodepublic static Element getRootElement(Document document)
If document is null, then null is returned.
document - The document (possibly null).document.public boolean canAddChild(Child child)
Parenttrue when a child can be added.canAddChild in interface Parentchild - The childtrue when child can be added.public void doAddChild(Child child)
ParentWARNING: Do not use, this is an implementation detail that may change at any time.
doAddChild in interface Parentchild - The child to add.public void doRemoveChild(Child child)
ParentWARNING: Do not use, this is an implementation detail that may change at any time.
doRemoveChild in interface Parentchild - The child to remove.public java.util.List<AbstractChild> getChildren()
getChildren in interface ParentCopyright © 2018. All rights reserved.