Class DTMNodeProxy
- All Implemented Interfaces:
Attr,CharacterData,Comment,Document,DocumentFragment,Element,Node,ProcessingInstruction,Text
DTMNodeProxy presents a DOM Node API front-end to the DTM model.
It does _not_ attempt to address the "node identity" question; no effort is made to prevent the creation of multiple proxies referring to a single DTM node. Users can create a mechanism for managing this, or relinquish the use of "==" and use the .sameNodeAs() mechanism, which is under consideration for future versions of the DOM.
DTMNodeProxy may be subclassed further to present specific DOM node types.
- See Also:
-
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionDTMNodeProxy(DTM dtm, int node) Create a DTMNodeProxy Node representing a specific Node in a DTM -
Method Summary
Modifier and TypeMethodDescriptionNEEDSDOC Method adoptNode NEEDSDOC @param sourcefinal NodeappendChild(Node newChild) final voidappendData(String arg) final NodecloneNode(boolean deep) shortcompareDocumentPosition(Node other) Compares a node with this node with regard to their position in the document.final AttrcreateAttribute(String name) final AttrcreateAttributeNS(String namespaceURI, String qualifiedName) final CDATASectioncreateCDATASection(String data) final CommentcreateComment(String data) final DocumentFragmentfinal ElementcreateElement(String tagName) final ElementcreateElementNS(String namespaceURI, String qualifiedName) final EntityReferencecreateEntityReference(String name) final ProcessingInstructioncreateProcessingInstruction(String target, String data) final TextcreateTextNode(String data) final voiddeleteData(int offset, int count) final booleanTest for equality based on node number.final booleanTest for equality based on node number.DOM Level 3 An attribute specifying the actual encoding of this document.final StringgetAttribute(String name) final AttrgetAttributeNode(String name) final AttrgetAttributeNodeNS(String namespaceURI, String localName) final StringgetAttributeNS(String namespaceURI, String localName) final NamedNodeMapThe absolute base URI of this node ornullif undefined.final NodeListfinal StringgetData()final DocumentTypefinal ElementThis is a bit of a problem in DTM, since a DTM may be a Document Fragment and hence not have a clear-cut Document Element.DOM Level 3 The location of the document ornullif undefined.The configuration used whenDocument.normalizeDocumentis invoked.final DTMgetDTM()NON-DOM: Return the DTM modelfinal intNON-DOM: Return the DTM node numberfinal ElementgetElementById(String elementId) final NodeListgetElementsByTagName(String tagname) final NodeListgetElementsByTagNameNS(String namespaceURI, String localName) getFeature(String feature, String version) This method returns a specialized object which implements the specialized APIs of the specified feature and version.final Nodefinal DOMImplementationfinal Nodefinal intfinal Stringfinal StringgetName()final Stringfinal Nodefinal Stringfinal shortfinal Stringfinal Documentfinal ElementGet the owner element of an attribute.final Nodefinal Nodefinal Stringfinal Nodefinal booleanbooleanfinal Stringfinal Stringfinal StringA PI's "target" states what processor channel the PI's data should be directed to.This attribute returns the text content of this node and its descendants.getUserData(String key) Retrieves the object associated to a key on a this node.final StringgetValue()DOM Level 3 Returns all text ofTextnodes logically-adjacent text nodes to this node, concatenated in document order.booleanbooleanhasAttribute(String name) Method hasAttributebooleanhasAttributeNS(String namespaceURI, String localName) Method hasAttributeNSbooleanIntroduced in DOM Level 2.final booleanfinal NodeimportNode(Node importedNode, boolean deep) final NodeinsertBefore(Node newChild, Node refChild) final voidinsertData(int offset, String arg) booleanisDefaultNamespace(String namespaceURI) DOM Level 3: This method checks if the specifiednamespaceURIis the default namespace or not.booleanDOM Level 3 Returns whether this text node contains whitespace in element content, often abusively called "ignorable whitespace".booleanisEqualNode(Node arg) Tests whether two nodes are equal.booleanisId()booleanisSameNode(Node other) Returns whether this node is the same node as the given one.final booleanisSupported(String feature, String version) Ask whether we support a given DOM feature.lookupNamespaceURI(String specifiedPrefix) DOM Level 3: Look up the namespace URI associated to the given prefix, starting from this node.lookupPrefix(String namespaceURI) DOM Level 3: Look up the prefix associated to the given namespace URI, starting from this node.final voidvoidDOM Level 3 Normalize document.final voidremoveAttribute(String name) final AttrremoveAttributeNode(Attr oldAttr) final voidremoveAttributeNS(String namespaceURI, String localName) final NoderemoveChild(Node oldChild) renameNode(Node n, String namespaceURI, String name) DOM Level 3 Renaming nodefinal NodereplaceChild(Node newChild, Node oldChild) final voidreplaceData(int offset, int count, String arg) replaceWholeText(String content) DOM Level 3final booleansameNodeAs(Node other) FUTURE DOM: Test node identity, in lieu of Node==NodevoidsetActualEncoding(String value) DOM Level 3 An attribute specifying the actual encoding of this document.final voidsetAttribute(String name, String value) final AttrsetAttributeNode(Attr newAttr) final AttrsetAttributeNodeNS(Attr newAttr) final voidsetAttributeNS(String namespaceURI, String qualifiedName, String value) final voidvoidsetDocumentURI(String documentURI) DOM Level 3voidsetIdAttribute(boolean id) NON-DOM: set the type of this attribute to be ID type.voidsetIdAttribute(String name, boolean makeId) DOM Level 3: register the given attribute node as an ID attributevoidsetIdAttributeNode(Attr at, boolean makeId) DOM Level 3: register the given attribute node as an ID attributevoidsetIdAttributeNS(String namespaceURI, String localName, boolean makeId) DOM Level 3: register the given attribute node as an ID attributefinal voidsetNodeValue(String nodeValue) final voidvoidsetStrictErrorChecking(boolean strictErrorChecking) voidsetTextContent(String textContent) This attribute returns the text content of this node and its descendants.setUserData(String key, Object data, UserDataHandler handler) final voidvoidsetXmlEncoding(String xmlEncoding) voidsetXmlStandalone(boolean xmlStandalone) voidsetXmlVersion(String xmlVersion) final TextsplitText(int offset) final StringsubstringData(int offset, int count) final booleanAsk whether we support a given DOM feature.
-
Field Details
-
dtm
The DTM for this node.
-
-
Constructor Details
-
DTMNodeProxy
Create a DTMNodeProxy Node representing a specific Node in a DTM- Parameters:
dtm- The DTM Reference, must be non-null.node- The DTM node handle.
-
-
Method Details
-
getDTM
NON-DOM: Return the DTM model- Returns:
- The DTM that this proxy is a representative for.
-
getDTMNodeNumber
public final int getDTMNodeNumber()NON-DOM: Return the DTM node number- Returns:
- The DTM node handle.
-
equals
Test for equality based on node number.- Parameters:
node- A DTM node proxy reference.- Returns:
- true if the given node has the same handle as this node.
-
equals
Test for equality based on node number. -
sameNodeAs
FUTURE DOM: Test node identity, in lieu of Node==Node- Parameters:
other-- Returns:
- true if the given node has the same handle as this node.
-
getNodeName
- Specified by:
getNodeNamein interfaceNode- See Also:
-
getTarget
A PI's "target" states what processor channel the PI's data should be directed to. It is defined differently in HTML and XML.In XML, a PI's "target" is the first (whitespace-delimited) token following the "<?" token that begins the PI.
In HTML, target is always null.
Note that getNodeName is aliased to getTarget.
- Specified by:
getTargetin interfaceProcessingInstruction
-
getLocalName
- Specified by:
getLocalNamein interfaceNode- See Also:
-
getPrefix
-
setPrefix
- Specified by:
setPrefixin interfaceNode- Parameters:
prefix-- Throws:
DOMException- See Also:
-
getNamespaceURI
- Specified by:
getNamespaceURIin interfaceNode- See Also:
-
supports
Ask whether we support a given DOM feature. In fact, we do not _fully_ support any DOM feature -- we're a read-only subset -- so arguably we should always return false. Or we could say that we support DOM Core Level 2 but all nodes are read-only. Unclear which answer is least misleading. NON-DOM method. This was present in early drafts of DOM Level 2, but was renamed isSupported. It's present here only because it's cheap, harmless, and might help some poor fool who is still trying to use an early Working Draft of the DOM.- Parameters:
feature-version-- Returns:
- false
-
isSupported
Ask whether we support a given DOM feature. In fact, we do not _fully_ support any DOM feature -- we're a read-only subset -- so arguably we should always return false.- Specified by:
isSupportedin interfaceNode- Parameters:
feature-version-- Returns:
- false
- See Also:
-
getNodeValue
- Specified by:
getNodeValuein interfaceNode- Throws:
DOMException- See Also:
-
getStringValue
- Returns:
- The string value of the node
- Throws:
DOMException
-
setNodeValue
- Specified by:
setNodeValuein interfaceNode- Parameters:
nodeValue-- Throws:
DOMException- See Also:
-
getNodeType
public final short getNodeType()- Specified by:
getNodeTypein interfaceNode- See Also:
-
getParentNode
- Specified by:
getParentNodein interfaceNode- See Also:
-
getOwnerNode
- See Also:
-
getChildNodes
- Specified by:
getChildNodesin interfaceNode- See Also:
-
getFirstChild
- Specified by:
getFirstChildin interfaceNode- See Also:
-
getLastChild
- Specified by:
getLastChildin interfaceNode- See Also:
-
getPreviousSibling
- Specified by:
getPreviousSiblingin interfaceNode- See Also:
-
getNextSibling
- Specified by:
getNextSiblingin interfaceNode- See Also:
-
getAttributes
- Specified by:
getAttributesin interfaceNode- See Also:
-
hasAttribute
Method hasAttribute- Specified by:
hasAttributein interfaceElement- Parameters:
name-
-
hasAttributeNS
Method hasAttributeNS- Specified by:
hasAttributeNSin interfaceElement- Parameters:
namespaceURI-localName-
-
getOwnerDocument
- Specified by:
getOwnerDocumentin interfaceNode- See Also:
-
insertBefore
- Specified by:
insertBeforein interfaceNode- Parameters:
newChild-refChild-- Throws:
DOMException- See Also:
-
replaceChild
- Specified by:
replaceChildin interfaceNode- Parameters:
newChild-oldChild-- Throws:
DOMException- See Also:
-
removeChild
- Specified by:
removeChildin interfaceNode- Parameters:
oldChild-- Throws:
DOMException- See Also:
-
appendChild
- Specified by:
appendChildin interfaceNode- Parameters:
newChild-- Throws:
DOMException- See Also:
-
hasChildNodes
public final boolean hasChildNodes()- Specified by:
hasChildNodesin interfaceNode- See Also:
-
cloneNode
-
getDoctype
- Specified by:
getDoctypein interfaceDocument- See Also:
-
getImplementation
- Specified by:
getImplementationin interfaceDocument- See Also:
-
getDocumentElement
This is a bit of a problem in DTM, since a DTM may be a Document Fragment and hence not have a clear-cut Document Element. We can make it work in the well-formed cases but would that be confusing for others?- Specified by:
getDocumentElementin interfaceDocument- See Also:
-
createElement
- Specified by:
createElementin interfaceDocument- Parameters:
tagName-- Throws:
DOMException- See Also:
-
createDocumentFragment
- Specified by:
createDocumentFragmentin interfaceDocument- See Also:
-
createTextNode
- Specified by:
createTextNodein interfaceDocument- Parameters:
data-- See Also:
-
createComment
- Specified by:
createCommentin interfaceDocument- Parameters:
data-- See Also:
-
createCDATASection
- Specified by:
createCDATASectionin interfaceDocument- Parameters:
data-- Throws:
DOMException- See Also:
-
createProcessingInstruction
public final ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException - Specified by:
createProcessingInstructionin interfaceDocument- Parameters:
target-data-- Throws:
DOMException- See Also:
-
createAttribute
- Specified by:
createAttributein interfaceDocument- Parameters:
name-- Throws:
DOMException- See Also:
-
createEntityReference
- Specified by:
createEntityReferencein interfaceDocument- Parameters:
name-- Throws:
DOMException- See Also:
-
getElementsByTagName
- Specified by:
getElementsByTagNamein interfaceDocument- Specified by:
getElementsByTagNamein interfaceElement- Parameters:
tagname-- See Also:
-
importNode
- Specified by:
importNodein interfaceDocument- Parameters:
importedNode-deep-- Throws:
DOMException- See Also:
-
createElementNS
- Specified by:
createElementNSin interfaceDocument- Parameters:
namespaceURI-qualifiedName-- Throws:
DOMException- See Also:
-
createAttributeNS
- Specified by:
createAttributeNSin interfaceDocument- Parameters:
namespaceURI-qualifiedName-- Throws:
DOMException- See Also:
-
getElementsByTagNameNS
- Specified by:
getElementsByTagNameNSin interfaceDocument- Specified by:
getElementsByTagNameNSin interfaceElement- Parameters:
namespaceURI-localName-- See Also:
-
getElementById
- Specified by:
getElementByIdin interfaceDocument- Parameters:
elementId-- See Also:
-
splitText
- Specified by:
splitTextin interfaceText- Parameters:
offset-- Throws:
DOMException- See Also:
-
getData
- Specified by:
getDatain interfaceCharacterData- Specified by:
getDatain interfaceProcessingInstruction- Throws:
DOMException- See Also:
-
setData
- Specified by:
setDatain interfaceCharacterData- Specified by:
setDatain interfaceProcessingInstruction- Parameters:
data-- Throws:
DOMException- See Also:
-
getLength
public final int getLength()- Specified by:
getLengthin interfaceCharacterData- See Also:
-
substringData
- Specified by:
substringDatain interfaceCharacterData- Parameters:
offset-count-- Throws:
DOMException- See Also:
-
appendData
- Specified by:
appendDatain interfaceCharacterData- Parameters:
arg-- Throws:
DOMException- See Also:
-
insertData
- Specified by:
insertDatain interfaceCharacterData- Parameters:
offset-arg-- Throws:
DOMException- See Also:
-
deleteData
- Specified by:
deleteDatain interfaceCharacterData- Parameters:
offset-count-- Throws:
DOMException- See Also:
-
replaceData
- Specified by:
replaceDatain interfaceCharacterData- Parameters:
offset-count-arg-- Throws:
DOMException- See Also:
-
getTagName
- Specified by:
getTagNamein interfaceElement- See Also:
-
getAttribute
- Specified by:
getAttributein interfaceElement- Parameters:
name-- See Also:
-
setAttribute
- Specified by:
setAttributein interfaceElement- Parameters:
name-value-- Throws:
DOMException- See Also:
-
removeAttribute
- Specified by:
removeAttributein interfaceElement- Parameters:
name-- Throws:
DOMException- See Also:
-
getAttributeNode
- Specified by:
getAttributeNodein interfaceElement- Parameters:
name-- See Also:
-
setAttributeNode
- Specified by:
setAttributeNodein interfaceElement- Parameters:
newAttr-- Throws:
DOMException- See Also:
-
removeAttributeNode
- Specified by:
removeAttributeNodein interfaceElement- Parameters:
oldAttr-- Throws:
DOMException- See Also:
-
hasAttributes
public boolean hasAttributes()Introduced in DOM Level 2.- Specified by:
hasAttributesin interfaceNode
-
normalize
public final void normalize() -
getAttributeNS
- Specified by:
getAttributeNSin interfaceElement- Parameters:
namespaceURI-localName-- See Also:
-
setAttributeNS
public final void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException - Specified by:
setAttributeNSin interfaceElement- Parameters:
namespaceURI-qualifiedName-value-- Throws:
DOMException- See Also:
-
removeAttributeNS
- Specified by:
removeAttributeNSin interfaceElement- Parameters:
namespaceURI-localName-- Throws:
DOMException- See Also:
-
getAttributeNodeNS
- Specified by:
getAttributeNodeNSin interfaceElement- Parameters:
namespaceURI-localName-- See Also:
-
setAttributeNodeNS
- Specified by:
setAttributeNodeNSin interfaceElement- Parameters:
newAttr-- Throws:
DOMException- See Also:
-
getName
-
getSpecified
public final boolean getSpecified()- Specified by:
getSpecifiedin interfaceAttr- See Also:
-
getValue
-
setValue
-
getOwnerElement
Get the owner element of an attribute.- Specified by:
getOwnerElementin interfaceAttr- See Also:
-
adoptNode
NEEDSDOC Method adoptNode NEEDSDOC @param source- Specified by:
adoptNodein interfaceDocument- Throws:
DOMException
-
getInputEncoding
Based on the Document Object Model (DOM) Level 3 Core Specification of 07 April 2004..
An attribute specifying, as part of the XML declaration, the encoding of this document. This is
nullwhen unspecified.- Specified by:
getInputEncodingin interfaceDocument- Since:
- DOM Level 3
-
getStrictErrorChecking
public boolean getStrictErrorChecking()Based on the Document Object Model (DOM) Level 3 Core Specification of 07 April 2004..
An attribute specifying whether errors checking is enforced or not. When set to
false, the implementation is free to not test every possible error case normally defined on DOM operations, and not raise anyDOMException. In case of error, the behavior is undefined. This attribute istrueby defaults.- Specified by:
getStrictErrorCheckingin interfaceDocument- Since:
- DOM Level 3
-
setStrictErrorChecking
public void setStrictErrorChecking(boolean strictErrorChecking) Based on the Document Object Model (DOM) Level 3 Core Specification of 07 April 2004..
An attribute specifying whether errors checking is enforced or not. When set to
false, the implementation is free to not test every possible error case normally defined on DOM operations, and not raise anyDOMException. In case of error, the behavior is undefined. This attribute istrueby defaults.- Specified by:
setStrictErrorCheckingin interfaceDocument- Since:
- DOM Level 3 NEEDSDOC @param strictErrorChecking
-
setUserData
- Specified by:
setUserDatain interfaceNode
-
getUserData
Retrieves the object associated to a key on a this node. The object must first have been set to this node by callingsetUserDatawith the same key.- Specified by:
getUserDatain interfaceNode- Parameters:
key- The key the object is associated to.- Returns:
- Returns the
DOMObjectassociated to the given key on this node, ornullif there was none. - Since:
- DOM Level 3
-
getFeature
This method returns a specialized object which implements the specialized APIs of the specified feature and version. The specialized object may also be obtained by using binding-specific casting methods but is not necessarily expected to, as discussed in Mixed DOM implementations.- Specified by:
getFeaturein interfaceNode- Parameters:
feature- The name of the feature requested (case-insensitive).version- This is the version number of the feature to test. If the version isnullor the empty string, supporting any version of the feature will cause the method to return an object that supports at least one version of the feature.- Returns:
- Returns an object which implements the specialized APIs of
the specified feature and version, if any, or
nullif there is no object which implements interfaces associated with that feature. If theDOMObjectreturned by this method implements theNodeinterface, it must delegate to the primary coreNodeand not return results inconsistent with the primary coreNodesuch as attributes, childNodes, etc. - Since:
- DOM Level 3
-
isEqualNode
Tests whether two nodes are equal.
This method tests for equality of nodes, not sameness (i.e., whether the two nodes are references to the same object) which can be tested withNode.isSameNode. All nodes that are the same will also be equal, though the reverse may not be true.
Two nodes are equal if and only if the following conditions are satisfied: The two nodes are of the same type.The following string attributes are equal:nodeName,localName,namespaceURI,prefix,nodeValue,baseURI. This is: they are bothnull, or they have the same length and are character for character identical. TheattributesNamedNodeMapsare equal. This is: they are bothnull, or they have the same length and for each node that exists in one map there is a node that exists in the other map and is equal, although not necessarily at the same index.ThechildNodesNodeListsare equal. This is: they are bothnull, or they have the same length and contain equal nodes at the same index. This is true forAttrnodes as for any other type of node. Note that normalization can affect equality; to avoid this, nodes should be normalized before being compared.
For twoDocumentTypenodes to be equal, the following conditions must also be satisfied: The following string attributes are equal:publicId,systemId,internalSubset.TheentitiesNamedNodeMapsare equal.ThenotationsNamedNodeMapsare equal.
On the other hand, the following do not affect equality: theownerDocumentattribute, thespecifiedattribute forAttrnodes, theisWhitespaceInElementContentattribute forTextnodes, as well as any user data or event listeners registered on the nodes.- Specified by:
isEqualNodein interfaceNode- Parameters:
arg- The node to compare equality with.deep- Iftrue, recursively compare the subtrees; iffalse, compare only the nodes themselves (and its attributes, if it is anElement).- Returns:
- If the nodes, and possibly subtrees are equal,
trueotherwisefalse. - Since:
- DOM Level 3
-
lookupNamespaceURI
DOM Level 3: Look up the namespace URI associated to the given prefix, starting from this node. Use lookupNamespaceURI(null) to lookup the default namespace- Specified by:
lookupNamespaceURIin interfaceNode- Parameters:
namespaceURI-- Returns:
- th URI for the namespace
- Since:
- DOM Level 3
-
isDefaultNamespace
DOM Level 3: This method checks if the specifiednamespaceURIis the default namespace or not.- Specified by:
isDefaultNamespacein interfaceNode- Parameters:
namespaceURI- The namespace URI to look for.- Returns:
trueif the specifiednamespaceURIis the default namespace,falseotherwise.- Since:
- DOM Level 3
-
lookupPrefix
DOM Level 3: Look up the prefix associated to the given namespace URI, starting from this node.- Specified by:
lookupPrefixin interfaceNode- Parameters:
namespaceURI-- Returns:
- the prefix for the namespace
-
isSameNode
Returns whether this node is the same node as the given one.
This method provides a way to determine whether twoNodereferences returned by the implementation reference the same object. When twoNodereferences are references to the same object, even if through a proxy, the references may be used completely interchangably, such that all attributes have the same values and calling the same DOM method on either reference always has exactly the same effect.- Specified by:
isSameNodein interfaceNode- Parameters:
other- The node to test against.- Returns:
- Returns
trueif the nodes are the same,falseotherwise. - Since:
- DOM Level 3
-
setTextContent
This attribute returns the text content of this node and its descendants. When it is defined to be null, setting it has no effect. When set, any possible children this node may have are removed and replaced by a singleTextnode containing the string this attribute is set to. On getting, no serialization is performed, the returned string does not contain any markup. No whitespace normalization is performed, the returned string does not contain the element content whitespaces . Similarly, on setting, no parsing is performed either, the input string is taken as pure textual content.
The string returned is made of the text content of this node depending on its type, as defined below:Node type Content ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, DOCUMENT_FRAGMENT_NODE concatenation of the textContentattribute value of every child node, excluding COMMENT_NODE and PROCESSING_INSTRUCTION_NODE nodesATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE nodeValueDOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE null - Specified by:
setTextContentin interfaceNode- Throws:
DOMException- NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.DOMException- DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in aDOMStringvariable on the implementation platform.- Since:
- DOM Level 3
-
getTextContent
This attribute returns the text content of this node and its descendants. When it is defined to be null, setting it has no effect. When set, any possible children this node may have are removed and replaced by a singleTextnode containing the string this attribute is set to. On getting, no serialization is performed, the returned string does not contain any markup. No whitespace normalization is performed, the returned string does not contain the element content whitespaces . Similarly, on setting, no parsing is performed either, the input string is taken as pure textual content.
The string returned is made of the text content of this node depending on its type, as defined below:Node type Content ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, DOCUMENT_FRAGMENT_NODE concatenation of the textContentattribute value of every child node, excluding COMMENT_NODE and PROCESSING_INSTRUCTION_NODE nodesATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE nodeValueDOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE null - Specified by:
getTextContentin interfaceNode- Throws:
DOMException- NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.DOMException- DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in aDOMStringvariable on the implementation platform.- Since:
- DOM Level 3
-
compareDocumentPosition
Compares a node with this node with regard to their position in the document.- Specified by:
compareDocumentPositionin interfaceNode- Parameters:
other- The node to compare against this node.- Returns:
- Returns how the given node is positioned relatively to this node.
- Throws:
DOMException- Since:
- DOM Level 3
-
getBaseURI
The absolute base URI of this node ornullif undefined. This value is computed according to . However, when theDocumentsupports the feature "HTML" , the base URI is computed using first the value of the href attribute of the HTML BASE element if any, and the value of thedocumentURIattribute from theDocumentinterface otherwise.
When the node is anElement, aDocumentor a aProcessingInstruction, this attribute represents the properties [base URI] defined in . When the node is aNotation, anEntity, or anEntityReference, this attribute represents the properties [declaration base URI] in the . How will this be affected by resolution of relative namespace URIs issue?It's not.Should this only be on Document, Element, ProcessingInstruction, Entity, and Notation nodes, according to the infoset? If not, what is it equal to on other nodes? Null? An empty string? I think it should be the parent's.No.Should this be read-only and computed or and actual read-write attribute?Read-only and computed (F2F 19 Jun 2000 and teleconference 30 May 2001).If the base HTML element is not yet attached to a document, does the insert change the Document.baseURI? Yes. (F2F 26 Sep 2001)- Specified by:
getBaseURIin interfaceNode- Since:
- DOM Level 3
-
renameNode
DOM Level 3 Renaming node- Specified by:
renameNodein interfaceDocument- Throws:
DOMException
-
normalizeDocument
public void normalizeDocument()DOM Level 3 Normalize document.- Specified by:
normalizeDocumentin interfaceDocument
-
getDomConfig
The configuration used whenDocument.normalizeDocumentis invoked.- Specified by:
getDomConfigin interfaceDocument- Since:
- DOM Level 3
-
setDocumentURI
DOM Level 3- Specified by:
setDocumentURIin interfaceDocument
-
getDocumentURI
DOM Level 3 The location of the document ornullif undefined.
Beware that when theDocumentsupports the feature "HTML" , the href attribute of the HTML BASE element takes precedence over this attribute.- Specified by:
getDocumentURIin interfaceDocument- Since:
- DOM Level 3
-
getActualEncoding
DOM Level 3 An attribute specifying the actual encoding of this document. This isnullotherwise.
This attribute represents the property [character encoding scheme] defined in .- Since:
- DOM Level 3
-
setActualEncoding
DOM Level 3 An attribute specifying the actual encoding of this document. This isnullotherwise.
This attribute represents the property [character encoding scheme] defined in .- Since:
- DOM Level 3
-
replaceWholeText
DOM Level 3- Specified by:
replaceWholeTextin interfaceText- Throws:
DOMException
-
getWholeText
DOM Level 3 Returns all text ofTextnodes logically-adjacent text nodes to this node, concatenated in document order.- Specified by:
getWholeTextin interfaceText- Since:
- DOM Level 3
-
isElementContentWhitespace
public boolean isElementContentWhitespace()DOM Level 3 Returns whether this text node contains whitespace in element content, often abusively called "ignorable whitespace".- Specified by:
isElementContentWhitespacein interfaceText
-
setIdAttribute
public void setIdAttribute(boolean id) NON-DOM: set the type of this attribute to be ID type.- Parameters:
id-
-
setIdAttribute
DOM Level 3: register the given attribute node as an ID attribute- Specified by:
setIdAttributein interfaceElement
-
setIdAttributeNode
DOM Level 3: register the given attribute node as an ID attribute- Specified by:
setIdAttributeNodein interfaceElement
-
setIdAttributeNS
DOM Level 3: register the given attribute node as an ID attribute- Specified by:
setIdAttributeNSin interfaceElement
-
getSchemaTypeInfo
- Specified by:
getSchemaTypeInfoin interfaceAttr- Specified by:
getSchemaTypeInfoin interfaceElement
-
isId
public boolean isId() -
getXmlEncoding
- Specified by:
getXmlEncodingin interfaceDocument
-
setXmlEncoding
-
getXmlStandalone
public boolean getXmlStandalone()- Specified by:
getXmlStandalonein interfaceDocument
-
setXmlStandalone
- Specified by:
setXmlStandalonein interfaceDocument- Throws:
DOMException
-
getXmlVersion
- Specified by:
getXmlVersionin interfaceDocument
-
setXmlVersion
- Specified by:
setXmlVersionin interfaceDocument- Throws:
DOMException
-