Package com.icl.saxon.tree
Class DocumentImpl
- java.lang.Object
-
- com.icl.saxon.om.AbstractNode
-
- com.icl.saxon.tree.NodeImpl
-
- com.icl.saxon.tree.DocumentImpl
-
- All Implemented Interfaces:
DocumentInfo
,NodeInfo
,DOMLocator
,Source
,SourceLocator
,Document
,Node
public final class DocumentImpl extends NodeImpl implements DocumentInfo, Document
A node in the XML parse tree representing the Document itself (or equivalently, the root node of the Document).
-
-
Field Summary
Fields Modifier and Type Field Description protected int
sequence
-
Fields inherited from class com.icl.saxon.tree.NodeImpl
emptyArray, parent
-
Fields inherited from class com.icl.saxon.om.AbstractNode
NODE_LETTER
-
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_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
-
-
Constructor Summary
Constructors Constructor Description DocumentImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChild(NodeImpl node, int index)
Add a child node to this node.Node
adoptNode(Node source)
Attempts to adopt a node from another document to this document.void
compact(int size)
Compact the space used by this nodevoid
copy(Outputter out)
Copy this node to a given outputtervoid
copyStringValue(Outputter out)
Copy the string-value of this node to a given outputtervoid
dropChildren()
Drop a branch of the tree.AxisEnumeration
enumerateChildren(NodeTest test)
Get an enumeration of the children of this nodeString
generateId()
Get a character string that uniquely identifies this node within the documentprotected AxisEnumeration
getAllElements(int fingerprint)
Get a list of all elements with a given name fingerprintString
getBaseURI()
Get the base URI of this root node.StringBuffer
getCharacterBuffer()
Get the character bufferNodeList
getChildNodes()
Return aNodeList
that contains all children of this node.Element
getDocumentElement()
Get the root (outermost) element.DocumentInfo
getDocumentRoot()
Get the root (document) nodeString
getDocumentURI()
The location of the document ornull
if undefined or if theDocument
was created usingDOMImplementation.createDocument
.DOMConfiguration
getDomConfig()
The configuration used whenDocument.normalizeDocument()
is invoked.Node
getFirstChild()
Get the first child node of the elementString
getInputEncoding()
An attribute specifying the encoding used for this document at the time of the parsing.Hashtable
getKeyIndex(KeyManager keymanager, int fingerprint)
Get the index for a given keyNode
getLastChild()
Get the last child node of the elementint
getLineNumber()
Get the line number of this root node.protected int
getLineNumber(int sequence)
Get the line number for an element.NamePool
getNamePool()
Get the name pool used for the names in this documentNode
getNextSibling()
Get next sibling - always nullNodeFactory
getNodeFactory()
Get the node factory that was used to build this documentshort
getNodeType()
Return the type of node.String
getNodeValue()
Get the node value as defined in the DOM.protected NodeImpl
getNthChild(int n)
Get the nth child node of the element (numbering from 0)Node
getPreviousSibling()
Get previous sibling - always nullprotected long
getSequenceNumber()
Get the node sequence number (in document order).boolean
getStrictErrorChecking()
An attribute specifying whether error checking is enforced or not.String
getStringValue()
Return the string-value of the node, that is, the concatenation of the character content of all descendent elements and text nodes.String
getSystemId()
Get the system id of this root nodeprotected String
getSystemId(int seq)
Get the system id of an element in the documentString
getUnparsedEntity(String name)
Get the unparsed entity with a given nameString
getXmlEncoding()
An attribute specifying, as part of the XML declaration, the encoding of this document.boolean
getXmlStandalone()
An attribute specifying, as part of the XML declaration, whether this document is standalone.String
getXmlVersion()
An attribute specifying, as part of the XML declaration, the version number of this document.boolean
hasChildNodes()
Determine if the node has any children.void
normalizeDocument()
This method acts as if the document was going through a save and load cycle, putting the document in a "normal" form.void
removeChild(int index)
Remove node at given index.Node
renameNode(Node n, String namespaceURI, String qualifiedName)
Rename an existing node of typeELEMENT_NODE
orATTRIBUTE_NODE
.void
renumberChildren()
Renumber the children of a given parent node.NodeInfo
selectID(String id)
Get the element with a given ID.protected void
setCharacterBuffer(StringBuffer buffer)
Set the character bufferprotected void
setDocumentElement(ElementImpl e)
Set the top-level element of the document (variously called the root element or the document element).void
setDocumentURI(String documentURI)
The location of the document ornull
if undefined or if theDocument
was created usingDOMImplementation.createDocument
.void
setKeyIndex(KeyManager keymanager, int fingerprint, Hashtable keyindex)
Set the index for a given key.protected void
setLineNumber(int sequence, int line)
Set the line number for an element.void
setLineNumbering()
Set line numbering onvoid
setNamePool(NamePool pool)
Set the name pool used for all names in this documentvoid
setNodeFactory(NodeFactory factory)
Set the node factory that was used to build this documentvoid
setStrictErrorChecking(boolean strictErrorChecking)
An attribute specifying whether error checking is enforced or not.protected void
setSystemId(int seq, String uri)
Set the system id of an element in the documentvoid
setSystemId(String uri)
Set the system id of this nodeprotected void
setUnparsedEntity(String name, String uri)
Set an unparsed entity URI associated with this document.void
setXmlStandalone(boolean xmlStandalone)
An attribute specifying, as part of the XML declaration, whether this document is standalone.void
setXmlVersion(String xmlVersion)
An attribute specifying, as part of the XML declaration, the version number of this document.void
useChildrenArray(NodeImpl[] array)
Supply an array to be used for the array of children.-
Methods inherited from class com.icl.saxon.tree.NodeImpl
compareOrder, getAttributes, getAttributeValue, getAttributeValue, getDisplayName, getEnumeration, getFingerprint, getLocalName, getNameCode, getNextInDocument, getOriginatingNode, getParent, getPrefix, getPreviousInDocument, getURI, hasAttributes, isSameNodeInfo, outputNamespaceNodes, removeNode
-
Methods inherited from class com.icl.saxon.om.AbstractNode
appendChild, appendData, cloneNode, compareDocumentPosition, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, disallowUpdate, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getColumnNumber, getData, getDoctype, getElementById, getElementsByTagName, getElementsByTagNameNS, getFeature, getImplementation, getLength, getName, getNamespaceURI, getNodeName, getOwnerDocument, getOwnerElement, getParentNode, getPublicId, getSchemaTypeInfo, getSpecified, getTagName, getTextContent, getUserData, getValue, getWholeText, hasAttribute, hasAttributeNS, importNode, insertBefore, insertData, isDefaultNamespace, isElementContentWhitespace, isEqualNode, isId, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, replaceChild, replaceData, replaceWholeText, setAttributeNode, setAttributeNodeNS, setAttributeNS, setData, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setPrefix, setTextContent, setUserData, setValue, splitText, substringData, supports
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.w3c.dom.Document
createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, importNode
-
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
-
Methods inherited from interface com.icl.saxon.om.NodeInfo
compareOrder, copyStringValue, getAttributeValue, getAttributeValue, getDisplayName, getEnumeration, getFingerprint, getLocalName, getNameCode, getParent, getPrefix, getStringValue, getURI, hasChildNodes, isSameNodeInfo, outputNamespaceNodes
-
-
-
-
Method Detail
-
setCharacterBuffer
protected void setCharacterBuffer(StringBuffer buffer)
Set the character buffer
-
getCharacterBuffer
public final StringBuffer getCharacterBuffer()
Get the character buffer
-
setNamePool
public void setNamePool(NamePool pool)
Set the name pool used for all names in this document- Specified by:
setNamePool
in interfaceDocumentInfo
-
getNamePool
public NamePool getNamePool()
Get the name pool used for the names in this document- Specified by:
getNamePool
in interfaceDocumentInfo
- Overrides:
getNamePool
in classNodeImpl
-
setNodeFactory
public void setNodeFactory(NodeFactory factory)
Set the node factory that was used to build this document
-
getNodeFactory
public NodeFactory getNodeFactory()
Get the node factory that was used to build this document
-
setDocumentElement
protected void setDocumentElement(ElementImpl e)
Set the top-level element of the document (variously called the root element or the document element). Note that a DocumentImpl may represent the root of a result tree fragment, in which case there is no document element.- Parameters:
e
- the top-level element
-
setSystemId
public void setSystemId(String uri)
Set the system id of this node- Specified by:
setSystemId
in interfaceSource
- Overrides:
setSystemId
in classNodeImpl
-
getSystemId
public String getSystemId()
Get the system id of this root node- Specified by:
getSystemId
in interfaceNodeInfo
- Specified by:
getSystemId
in interfaceSource
- Specified by:
getSystemId
in interfaceSourceLocator
- Overrides:
getSystemId
in classNodeImpl
- Returns:
- the System Identifier of the entity in the source document containing the node, or null if not known. Note this is not the same as the base URI: the base URI can be modified by xml:base, but the system ID cannot.
-
getBaseURI
public String getBaseURI()
Get the base URI of this root node. For a root node the base URI is the same as the System ID.- Specified by:
getBaseURI
in interfaceNode
- Specified by:
getBaseURI
in interfaceNodeInfo
- Overrides:
getBaseURI
in classNodeImpl
-
setSystemId
protected void setSystemId(int seq, String uri)
Set the system id of an element in the document
-
getSystemId
protected String getSystemId(int seq)
Get the system id of an element in the document
-
setLineNumbering
public void setLineNumbering()
Set line numbering on
-
setLineNumber
protected void setLineNumber(int sequence, int line)
Set the line number for an element. Ignored if line numbering is off.
-
getLineNumber
protected int getLineNumber(int sequence)
Get the line number for an element. Return -1 if line numbering is off.
-
getLineNumber
public int getLineNumber()
Get the line number of this root node.- Specified by:
getLineNumber
in interfaceNodeInfo
- Specified by:
getLineNumber
in interfaceSourceLocator
- Overrides:
getLineNumber
in classNodeImpl
- Returns:
- 0 always
-
getNodeType
public final short getNodeType()
Return the type of node.- Specified by:
getNodeType
in interfaceNode
- Specified by:
getNodeType
in interfaceNodeInfo
- Returns:
- NodeInfo.ROOT (always)
-
getNextSibling
public final Node getNextSibling()
Get next sibling - always null- Specified by:
getNextSibling
in interfaceNode
- Overrides:
getNextSibling
in classNodeImpl
- Returns:
- null
-
getPreviousSibling
public final Node getPreviousSibling()
Get previous sibling - always null- Specified by:
getPreviousSibling
in interfaceNode
- Overrides:
getPreviousSibling
in classNodeImpl
- Returns:
- null
-
getDocumentElement
public Element getDocumentElement()
Get the root (outermost) element.- Specified by:
getDocumentElement
in interfaceDocument
- Overrides:
getDocumentElement
in classNodeImpl
- Returns:
- the Element node for the outermost element of the document.
-
getDocumentRoot
public DocumentInfo getDocumentRoot()
Get the root (document) node- Specified by:
getDocumentRoot
in interfaceNodeInfo
- Overrides:
getDocumentRoot
in classNodeImpl
- Returns:
- the DocumentInfo representing this document
-
generateId
public String generateId()
Get a character string that uniquely identifies this node within the document- Specified by:
generateId
in interfaceNodeInfo
- Overrides:
generateId
in classNodeImpl
- Returns:
- the empty string
-
getAllElements
protected AxisEnumeration getAllElements(int fingerprint)
Get a list of all elements with a given name fingerprint
-
selectID
public NodeInfo selectID(String id)
Get the element with a given ID.- Specified by:
selectID
in interfaceDocumentInfo
- Parameters:
id
- The unique ID of the required element, previously registered using registerID()- Returns:
- The NodeInfo for the given ID if one has been registered, otherwise null.
-
getKeyIndex
public Hashtable getKeyIndex(KeyManager keymanager, int fingerprint)
Get the index for a given key- Specified by:
getKeyIndex
in interfaceDocumentInfo
- Parameters:
keymanager
- The key manager managing this keyfingerprint
- The fingerprint of the name of the key (unique with the key manager)- Returns:
- The index, if one has been built, in the form of a Hashtable that maps the key value to a Vector of nodes having that key value. If no index has been built, returns null.
-
setKeyIndex
public void setKeyIndex(KeyManager keymanager, int fingerprint, Hashtable keyindex)
Set the index for a given key. The method is synchronized because the same document can be used by several stylesheets at the same time.- Specified by:
setKeyIndex
in interfaceDocumentInfo
- Parameters:
keymanager
- The key manager managing this keyfingerprint
- The fingerprint of the name of the key (unique with the key manager)keyindex
- the index, in the form of a Hashtable that maps the key value to a Vector of nodes having that key value. Or the String "under construction", indicating that the index is being built.
-
setUnparsedEntity
protected void setUnparsedEntity(String name, String uri)
Set an unparsed entity URI associated with this document. For system use only, while building the document.
-
getUnparsedEntity
public String getUnparsedEntity(String name)
Get the unparsed entity with a given name- Specified by:
getUnparsedEntity
in interfaceDocumentInfo
- Parameters:
name
- the name of the entity- Returns:
- the URI of the entity if there is one, or empty string if not
-
copy
public void copy(Outputter out) throws TransformerException
Copy this node to a given outputter- Specified by:
copy
in interfaceNodeInfo
- Throws:
TransformerException
-
adoptNode
public Node adoptNode(Node source) throws DOMException
Attempts to adopt a node from another document to this document.- Specified by:
adoptNode
in interfaceDocument
- Parameters:
source
- The node to move into this document.- Returns:
- The adopted node, or
null
if this operation fails, such as when the source node comes from a different implementation. - Throws:
DOMException
- NOT_SUPPORTED_ERR: Raised if the source node is of typeDOCUMENT
,DOCUMENT_TYPE
.
NO_MODIFICATION_ALLOWED_ERR: Raised when the source node is readonly.- Since:
- DOM Level 3
-
getDocumentURI
public String getDocumentURI()
The location of the document ornull
if undefined or if theDocument
was created usingDOMImplementation.createDocument
. No lexical checking is performed when setting this attribute; this could result in anull
value returned when usingNode.baseURI
.
Beware that when theDocument
supports the feature "HTML" [DOM Level 2 HTML] , the href attribute of the HTML BASE element takes precedence over this attribute when computingNode.baseURI
.- Specified by:
getDocumentURI
in interfaceDocument
- Since:
- DOM Level 3
-
getDomConfig
public DOMConfiguration getDomConfig()
The configuration used whenDocument.normalizeDocument()
is invoked.- Specified by:
getDomConfig
in interfaceDocument
- Since:
- DOM Level 3
-
getInputEncoding
public String getInputEncoding()
An attribute specifying the encoding used for this document at the time of the parsing. This isnull
when it is not known, such as when theDocument
was created in memory.- Specified by:
getInputEncoding
in interfaceDocument
- Since:
- DOM Level 3
-
getStrictErrorChecking
public boolean getStrictErrorChecking()
An attribute specifying whether error checking is enforced or not. When set tofalse
, the implementation is free to not test every possible error case normally defined on DOM operations, and not raise anyDOMException
on DOM operations or report errors while usingDocument.normalizeDocument()
. In case of error, the behavior is undefined. This attribute istrue
by default.- Specified by:
getStrictErrorChecking
in interfaceDocument
- Since:
- DOM Level 3
-
getXmlEncoding
public String getXmlEncoding()
An attribute specifying, as part of the XML declaration, the encoding of this document. This isnull
when unspecified or when it is not known, such as when theDocument
was created in memory.- Specified by:
getXmlEncoding
in interfaceDocument
- Since:
- DOM Level 3
-
getXmlStandalone
public boolean getXmlStandalone()
An attribute specifying, as part of the XML declaration, whether this document is standalone. This isfalse
when unspecified.Note: No verification is done on the value when setting this attribute. Applications should use
Document.normalizeDocument()
with the "validate" parameter to verify if the value matches the validity constraint for standalone document declaration as defined in [XML 1.0].- Specified by:
getXmlStandalone
in interfaceDocument
- Since:
- DOM Level 3
-
getXmlVersion
public String getXmlVersion()
An attribute specifying, as part of the XML declaration, the version number of this document. If there is no declaration and if this document supports the "XML" feature, the value is"1.0"
.- Specified by:
getXmlVersion
in interfaceDocument
- Since:
- DOM Level 3
-
normalizeDocument
public void normalizeDocument()
This method acts as if the document was going through a save and load cycle, putting the document in a "normal" form.- Specified by:
normalizeDocument
in interfaceDocument
- Since:
- DOM Level 3
-
renameNode
public Node renameNode(Node n, String namespaceURI, String qualifiedName) throws DOMException
Rename an existing node of typeELEMENT_NODE
orATTRIBUTE_NODE
.- Specified by:
renameNode
in interfaceDocument
- Parameters:
n
- The node to rename.namespaceURI
- The new namespace URI.qualifiedName
- The new qualified name.- Returns:
- The renamed node. This is either the specified node or the new node that was created to replace the specified node.
- Throws:
DOMException
- NOT_SUPPORTED_ERR: Raised when the type of the specified node is neitherELEMENT_NODE
norATTRIBUTE_NODE
, or if the implementation does not support the renaming of the document element.
INVALID_CHARACTER_ERR: Raised if the new qualified name is not an XML name according to the XML version in use specified in theDocument.xmlVersion
attribute.
WRONG_DOCUMENT_ERR: Raised when the specified node was created from a different document than this document.
NAMESPACE_ERR: Raised if thequalifiedName
is a malformed qualified name, if thequalifiedName
has a prefix and thenamespaceURI
isnull
, or if thequalifiedName
has a prefix that is "xml" and thenamespaceURI
is different from " http://www.w3.org/XML/1998/namespace" [XML Namespaces] . Also raised, when the node being renamed is an attribute, if thequalifiedName
, or its prefix, is "xmlns" and thenamespaceURI
is different from "http://www.w3.org/2000/xmlns/".- Since:
- DOM Level 3
-
setDocumentURI
public void setDocumentURI(String documentURI)
The location of the document ornull
if undefined or if theDocument
was created usingDOMImplementation.createDocument
. No lexical checking is performed when setting this attribute; this could result in anull
value returned when usingNode.baseURI
.
Beware that when theDocument
supports the feature "HTML" [DOM Level 2 HTML] , the href attribute of the HTML BASE element takes precedence over this attribute when computingNode.baseURI
.- Specified by:
setDocumentURI
in interfaceDocument
- Since:
- DOM Level 3
-
setStrictErrorChecking
public void setStrictErrorChecking(boolean strictErrorChecking)
An attribute specifying whether error checking is enforced or not. When set tofalse
, the implementation is free to not test every possible error case normally defined on DOM operations, and not raise anyDOMException
on DOM operations or report errors while usingDocument.normalizeDocument()
. In case of error, the behavior is undefined. This attribute istrue
by default.- Specified by:
setStrictErrorChecking
in interfaceDocument
- Since:
- DOM Level 3
-
setXmlStandalone
public void setXmlStandalone(boolean xmlStandalone) throws DOMException
An attribute specifying, as part of the XML declaration, whether this document is standalone. This isfalse
when unspecified.Note: No verification is done on the value when setting this attribute. Applications should use
Document.normalizeDocument()
with the "validate" parameter to verify if the value matches the validity constraint for standalone document declaration as defined in [XML 1.0].- Specified by:
setXmlStandalone
in interfaceDocument
- Throws:
DOMException
- NOT_SUPPORTED_ERR: Raised if this document does not support the "XML" feature.- Since:
- DOM Level 3
-
setXmlVersion
public void setXmlVersion(String xmlVersion) throws DOMException
An attribute specifying, as part of the XML declaration, the version number of this document. If there is no declaration and if this document supports the "XML" feature, the value is"1.0"
. If this document does not support the "XML" feature, the value is alwaysnull
. Changing this attribute will affect methods that check for invalid characters in XML names. Application should invokeDocument.normalizeDocument()
in order to check for invalid characters in theNode
s that are already part of thisDocument
.
DOM applications may use theDOMImplementation.hasFeature(feature, version)
method with parameter values "XMLVersion" and "1.0" (respectively) to determine if an implementation supports [XML 1.0]. DOM applications may use the same method with parameter values "XMLVersion" and "1.1" (respectively) to determine if an implementation supports [XML 1.1]. In both cases, in order to support XML, an implementation must also support the "XML" feature defined in this specification.Document
objects supporting a version of the "XMLVersion" feature must not raise aNOT_SUPPORTED_ERR
exception for the same version number when usingDocument.xmlVersion
.- Specified by:
setXmlVersion
in interfaceDocument
- Throws:
DOMException
- NOT_SUPPORTED_ERR: Raised if the version is set to a value that is not supported by thisDocument
or if this document does not support the "XML" feature.- Since:
- DOM Level 3
-
getSequenceNumber
protected final long getSequenceNumber()
Get the node sequence number (in document order). Sequence numbers are monotonic but not consecutive. In the current implementation, parent nodes (elements and roots) have a zero least-significant word, while namespaces, attributes, text nodes, comments, and PIs have the top word the same as their owner and the bottom half reflecting their relative position.- Overrides:
getSequenceNumber
in classNodeImpl
-
hasChildNodes
public final boolean hasChildNodes()
Determine if the node has any children.- Specified by:
hasChildNodes
in interfaceNode
- Specified by:
hasChildNodes
in interfaceNodeInfo
- Overrides:
hasChildNodes
in classNodeImpl
- Returns:
true
if the node has any children,false
if the node has no children.
-
enumerateChildren
public final AxisEnumeration enumerateChildren(NodeTest test)
Get an enumeration of the children of this node
-
getFirstChild
public final Node getFirstChild()
Get the first child node of the element- Specified by:
getFirstChild
in interfaceNode
- Overrides:
getFirstChild
in classNodeImpl
- Returns:
- the first child node of the required type, or null if there are no children
-
getLastChild
public final Node getLastChild()
Get the last child node of the element- Specified by:
getLastChild
in interfaceNode
- Overrides:
getLastChild
in classNodeImpl
- Returns:
- the last child of the element, or null if there are no children
-
getChildNodes
public final NodeList getChildNodes()
Return aNodeList
that contains all children of this node. If there are no children, this is aNodeList
containing no nodes.- Specified by:
getChildNodes
in interfaceNode
- Overrides:
getChildNodes
in classNodeImpl
-
getNthChild
protected final NodeImpl getNthChild(int n)
Get the nth child node of the element (numbering from 0)- Returns:
- the last child of the element, or null if there is no n'th child
-
getStringValue
public String getStringValue()
Return the string-value of the node, that is, the concatenation of the character content of all descendent elements and text nodes.- Returns:
- the accumulated character content of the element, including descendant elements.
-
copyStringValue
public void copyStringValue(Outputter out) throws TransformerException
Copy the string-value of this node to a given outputter- Specified by:
copyStringValue
in interfaceNodeInfo
- Overrides:
copyStringValue
in classAbstractNode
- Throws:
TransformerException
-
useChildrenArray
public void useChildrenArray(NodeImpl[] array)
Supply an array to be used for the array of children. For system use only.
-
addChild
public void addChild(NodeImpl node, int index)
Add a child node to this node. For system use only. Note: normalizing adjacent text nodes is the responsibility of the caller.
-
removeChild
public void removeChild(int index)
Remove node at given index. Will always be followed by a renumberChildren().
-
renumberChildren
public void renumberChildren()
Renumber the children of a given parent node. For system use only
-
dropChildren
public void dropChildren()
Drop a branch of the tree. The target element remains in the tree, but its children are disconnected from the parent. Unless there are other references to the children (e.g. in a variable) they will be deleted from memory next time the garbage collector comes round.
-
compact
public void compact(int size)
Compact the space used by this node
-
getNodeValue
public String getNodeValue()
Get the node value as defined in the DOM. This is not the same as the XPath string-value.- Specified by:
getNodeValue
in interfaceNode
- Overrides:
getNodeValue
in classAbstractNode
-
-