public abstract class ParentNode extends NodeImpl implements org.w3c.dom.NodeList, IParentNode
| Modifier and Type | Field and Description |
|---|---|
protected NodeImpl |
firstChild |
protected NodeImpl |
lastChild |
factory, FIRSTCHILD, flags, HAS_PARENT, SPECIFIEDCOMPLETE, DISCARDED, INCOMPLETEATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE| Modifier | Constructor and Description |
|---|---|
protected |
ParentNode(OMFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(OMNode omNode) |
void |
addChild(OMNode omNode,
boolean fromBuilder) |
org.w3c.dom.Node |
appendChild(org.w3c.dom.Node newChild) |
(package private) NodeImpl |
clone(OMCloneOptions options,
ParentNode targetParent,
boolean deep,
boolean namespaceRepairing) |
org.w3c.dom.NodeList |
getChildNodes() |
java.util.Iterator |
getChildren() |
java.util.Iterator |
getChildrenWithLocalName(java.lang.String localName) |
java.util.Iterator |
getChildrenWithName(javax.xml.namespace.QName elementQName)
Returns an iterator of child nodes having a given qname.
|
java.util.Iterator |
getChildrenWithNamespaceURI(java.lang.String uri) |
java.util.Iterator |
getDescendants(boolean includeSelf) |
org.w3c.dom.Node |
getFirstChild()
Gets the first child of this Node, or null if none.
|
OMElement |
getFirstChildWithName(javax.xml.namespace.QName elementQName)
Returns the first OMElement child node.
|
OMNode |
getFirstOMChild() |
OMNode |
getFirstOMChildIfAvailable()
Get the first child if it is available.
|
org.w3c.dom.Node |
getLastChild()
Gets the last child of this Node, or null if none.
|
OMNode |
getLastKnownOMChild() |
int |
getLength() |
javax.xml.transform.sax.SAXSource |
getSAXSource(boolean cache) |
java.lang.String |
getTextContent() |
(package private) void |
getTextContent(java.lang.StringBuffer buf) |
javax.xml.stream.XMLStreamReader |
getXMLStreamReader() |
javax.xml.stream.XMLStreamReader |
getXMLStreamReader(boolean cache) |
javax.xml.stream.XMLStreamReader |
getXMLStreamReader(boolean cache,
OMXMLStreamReaderConfiguration configuration) |
javax.xml.stream.XMLStreamReader |
getXMLStreamReaderWithoutCaching() |
boolean |
hasChildNodes() |
private static boolean |
hasTextContent(org.w3c.dom.Node child) |
org.w3c.dom.Node |
insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
Inserts newChild before the refChild.
|
private org.w3c.dom.Node |
insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild,
boolean useDomSemantics) |
(package private) void |
internalAppendChild(NodeImpl node) |
private boolean |
isAncestorOrSelf(org.w3c.dom.Node node)
Checks if the given node is an ancestor (or identical) to this node.
|
org.w3c.dom.Node |
item(int index) |
(package private) void |
normalize(DOMConfigurationImpl config) |
(package private) void |
notifyChildComplete() |
org.w3c.dom.Node |
removeChild(org.w3c.dom.Node oldChild)
Removes the given child from the DOM Tree.
|
org.w3c.dom.Node |
replaceChild(org.w3c.dom.Node newChild,
org.w3c.dom.Node oldChild)
Replaces the oldChild with the newChild.
|
void |
setFirstChild(OMNode firstChild) |
void |
setLastChild(OMNode omNode)
Forcefully set the last child
|
void |
setTextContent(java.lang.String textContent) |
(package private) abstract ParentNode |
shallowClone(OMCloneOptions options,
ParentNode targetParent,
boolean namespaceRepairing) |
build, buildWithAttachments, checkSameOwnerDocument, clone, cloneNode, close, compareDocumentPosition, detach, detach, getAttributes, getBaseURI, getBuilder, getFeature, getLocalName, getNamespaceURI, getNextOMSiblingIfAvailable, getNodeValue, getOMFactory, getOwnerDocument, getParent, getParentNode, getPrefix, getPreviousOMSibling, getPreviousSibling, getUserData, hasAttributes, hasParent, hasParent, insertSiblingAfter, insertSiblingBefore, internalGetNextSibling, internalGetOwnerNode, internalGetPreviousSibling, internalSerialize, internalSerialize, internalSerializeAndConsume, internalSetNextSibling, internalSetOwnerNode, internalSetPreviousSibling, isComplete, isDefaultNamespace, isEqualNode, isFirstChild, isFirstChild, isSameNode, isSpecified, isSpecified, isSupported, lookupPrefix, normalize, ownerDocument, parentNode, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setComplete, setNextOMSibling, setNodeValue, setOwnerDocument, setParent, setParent, setPrefix, setPreviousOMSibling, setUserDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBuilder, getState, isCompleteprotected ParentNode(OMFactory factory)
void internalAppendChild(NodeImpl node)
public void addChild(OMNode omNode)
public void addChild(OMNode omNode, boolean fromBuilder)
public java.util.Iterator getChildren()
public java.util.Iterator getDescendants(boolean includeSelf)
public java.util.Iterator getChildrenWithName(javax.xml.namespace.QName elementQName)
throws OMException
OMException(javax.xml.namespace.QName)public java.util.Iterator getChildrenWithLocalName(java.lang.String localName)
public java.util.Iterator getChildrenWithNamespaceURI(java.lang.String uri)
public OMElement getFirstChildWithName(javax.xml.namespace.QName elementQName) throws OMException
OMException(javax.xml.namespace.QName)public OMNode getFirstOMChild()
public OMNode getFirstOMChildIfAvailable()
IParentNodeOMSerializable.isComplete() may return false when called on the child.
In contrast to OMContainer.getFirstOMChild(), this method will never modify
the state of the underlying parser.getFirstOMChildIfAvailable in interface IParentNodenull if the container has no children or
the builder has not yet started to build the first childpublic OMNode getLastKnownOMChild()
public void setFirstChild(OMNode firstChild)
public void setLastChild(OMNode omNode)
omNode - public final org.w3c.dom.NodeList getChildNodes()
getChildNodes in interface org.w3c.dom.Nodepublic final int getLength()
getLength in interface org.w3c.dom.NodeListpublic final org.w3c.dom.Node item(int index)
item in interface org.w3c.dom.NodeListpublic org.w3c.dom.Node getFirstChild()
NodeImplgetFirstChild in interface org.w3c.dom.NodegetFirstChild in class NodeImplParentNodepublic org.w3c.dom.Node getLastChild()
NodeImplgetLastChild in interface org.w3c.dom.NodegetLastChild in class NodeImplParentNodepublic boolean hasChildNodes()
hasChildNodes in interface org.w3c.dom.NodehasChildNodes in class NodeImplpublic final org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild)
throws org.w3c.dom.DOMException
appendChild in interface org.w3c.dom.Nodeorg.w3c.dom.DOMExceptionpublic org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
throws org.w3c.dom.DOMException
insertBefore in interface org.w3c.dom.Nodeorg.w3c.dom.DOMExceptionprivate org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild,
boolean useDomSemantics)
public final org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild,
org.w3c.dom.Node oldChild)
throws org.w3c.dom.DOMException
replaceChild in interface org.w3c.dom.Nodeorg.w3c.dom.DOMExceptionpublic final org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild)
throws org.w3c.dom.DOMException
removeChild in interface org.w3c.dom.Nodeorg.w3c.dom.DOMExceptionprivate boolean isAncestorOrSelf(org.w3c.dom.Node node)
node - the node to checktrue if the node is an ancestor or indentical to this nodefinal NodeImpl clone(OMCloneOptions options, ParentNode targetParent, boolean deep, boolean namespaceRepairing)
abstract ParentNode shallowClone(OMCloneOptions options, ParentNode targetParent, boolean namespaceRepairing)
public java.lang.String getTextContent()
throws org.w3c.dom.DOMException
getTextContent in interface org.w3c.dom.NodegetTextContent in class NodeImplorg.w3c.dom.DOMExceptionvoid getTextContent(java.lang.StringBuffer buf)
throws org.w3c.dom.DOMException
getTextContent in class NodeImplorg.w3c.dom.DOMExceptionprivate static boolean hasTextContent(org.w3c.dom.Node child)
public void setTextContent(java.lang.String textContent)
throws org.w3c.dom.DOMException
setTextContent in interface org.w3c.dom.NodesetTextContent in class NodeImplorg.w3c.dom.DOMExceptionpublic javax.xml.stream.XMLStreamReader getXMLStreamReaderWithoutCaching()
public javax.xml.stream.XMLStreamReader getXMLStreamReader()
public javax.xml.stream.XMLStreamReader getXMLStreamReader(boolean cache)
public javax.xml.stream.XMLStreamReader getXMLStreamReader(boolean cache,
OMXMLStreamReaderConfiguration configuration)
public javax.xml.transform.sax.SAXSource getSAXSource(boolean cache)
void notifyChildComplete()
void normalize(DOMConfigurationImpl config)