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 and Description |
|---|
UnImplNode()
Constructor UnImplNode
|
| Modifier and Type | Method and Description |
|---|---|
Node |
adoptNode(Node source)
NEEDSDOC Method adoptNode
NEEDSDOC @param source
NEEDSDOC (adoptNode) @return
|
Node |
appendChild(Node newChild)
Unimplemented.
|
void |
appendData(java.lang.String arg)
Unimplemented.
|
Node |
cloneNode(boolean deep)
Unimplemented.
|
short |
compareDocumentPosition(Node other)
Compares a node with this node with regard to their position in the
document.
|
Attr |
createAttribute(java.lang.String name)
Unimplemented.
|
Attr |
createAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
Unimplemented.
|
CDATASection |
createCDATASection(java.lang.String data)
Unimplemented.
|
Comment |
createComment(java.lang.String data)
Unimplemented.
|
DocumentFragment |
createDocumentFragment()
Unimplemented.
|
Element |
createElement(java.lang.String tagName)
Unimplemented.
|
Element |
createElementNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
Unimplemented.
|
EntityReference |
createEntityReference(java.lang.String name)
Unimplemented.
|
ProcessingInstruction |
createProcessingInstruction(java.lang.String target,
java.lang.String data)
Unimplemented.
|
Text |
createTextNode(java.lang.String data)
Unimplemented.
|
void |
deleteData(int offset,
int count)
Unimplemented.
|
void |
error(java.lang.String msg)
Throw an error.
|
void |
error(java.lang.String msg,
java.lang.Object[] args)
Throw an error.
|
java.lang.String |
getActualEncoding()
DOM Level 3
An attribute specifying the actual encoding of this document.
|
java.lang.String |
getAttribute(java.lang.String name)
Unimplemented.
|
Attr |
getAttributeNode(java.lang.String name)
Unimplemented.
|
Attr |
getAttributeNodeNS(java.lang.String namespaceURI,
java.lang.String localName)
Unimplemented.
|
java.lang.String |
getAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
Unimplemented.
|
NamedNodeMap |
getAttributes()
Unimplemented.
|
java.lang.String |
getBaseURI()
The absolute base URI of this node or
null if undefined. |
NodeList |
getChildNodes()
Unimplemented.
|
DocumentType |
getDoctype()
Unimplemented.
|
Element |
getDocumentElement()
Unimplemented.
|
java.lang.String |
getDocumentURI()
DOM Level 3
The location of the document or
null if undefined. |
DOMConfiguration |
getDomConfig()
The configuration used when
Document.normalizeDocument is
invoked. |
Element |
getElementById(java.lang.String elementId)
Unimplemented.
|
NodeList |
getElementsByTagName(java.lang.String name)
Unimplemented.
|
NodeList |
getElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
Unimplemented.
|
java.lang.Object |
getFeature(java.lang.String feature,
java.lang.String version)
This method returns a specialized object which implements the
specialized APIs of the specified feature and version.
|
Node |
getFirstChild()
Unimplemented.
|
DOMImplementation |
getImplementation()
Unimplemented.
|
java.lang.String |
getInputEncoding()
|
Node |
getLastChild()
Unimplemented.
|
int |
getLength()
Unimplemented.
|
java.lang.String |
getLocalName()
Unimplemented.
|
java.lang.String |
getNamespaceURI()
Unimplemented.
|
Node |
getNextSibling()
Unimplemented.
|
java.lang.String |
getNodeName()
Unimplemented.
|
short |
getNodeType()
Unimplemented.
|
java.lang.String |
getNodeValue()
Unimplemented.
|
Document |
getOwnerDocument()
Unimplemented.
|
Element |
getOwnerElement()
Unimplemented.
|
Node |
getParentNode()
Unimplemented.
|
java.lang.String |
getPrefix()
Unimplemented.
|
Node |
getPreviousSibling()
Unimplemented.
|
TypeInfo |
getSchemaTypeInfo()
Method getSchemaTypeInfo.
|
boolean |
getSpecified()
Unimplemented.
|
boolean |
getStrictErrorChecking()
|
java.lang.String |
getTagName()
Unimplemented.
|
java.lang.String |
getTextContent()
This attribute returns the text content of this node and its
descendants.
|
java.lang.Object |
getUserData(java.lang.String key)
Retrieves the object associated to a key on a this node.
|
java.lang.String |
getWholeText()
DOM Level 3
Returns all text of
Text nodes logically-adjacent text
nodes to this node, concatenated in document order. |
java.lang.String |
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.
|
java.lang.String |
getXmlVersion()
An attribute specifying, as part of the XML declaration, the version number of this document.
|
boolean |
hasAttribute(java.lang.String name)
Unimplemented.
|
boolean |
hasAttributeNS(java.lang.String name,
java.lang.String x)
Unimplemented.
|
boolean |
hasAttributes()
Unimplemented.
|
boolean |
hasChildNodes()
Unimplemented.
|
Node |
importNode(Node importedNode,
boolean deep)
Unimplemented.
|
Node |
insertBefore(Node newChild,
Node refChild)
Unimplemented.
|
void |
insertData(int offset,
java.lang.String arg)
Unimplemented.
|
boolean |
isDefaultNamespace(java.lang.String namespaceURI)
DOM Level 3:
This method checks if the specified
namespaceURI is the
default namespace or not. |
boolean |
isEqualNode(Node arg)
Tests whether two nodes are equal.
|
boolean |
isId() |
boolean |
isSameNode(Node other)
Returns whether this node is the same node as the given one.
|
boolean |
isSupported(java.lang.String feature,
java.lang.String version)
Tests whether the DOM implementation implements a specific feature and
that feature is supported by this node.
|
boolean |
isWhitespaceInElementContent()
DOM Level 3
Returns whether this text node contains whitespace in element content,
often abusively called "ignorable whitespace".
|
Node |
item(int index)
Unimplemented.
|
java.lang.String |
lookupNamespaceURI(java.lang.String specifiedPrefix)
DOM Level 3:
Look up the namespace URI associated to the given prefix, starting from this node.
|
java.lang.String |
lookupPrefix(java.lang.String namespaceURI)
DOM Level 3:
Look up the prefix associated to the given namespace URI, starting from this node.
|
void |
normalize()
Unimplemented.
|
void |
normalizeDocument()
DOM Level 3
Normalize document.
|
void |
removeAttribute(java.lang.String name)
Unimplemented.
|
Attr |
removeAttributeNode(Attr oldAttr)
Unimplemented.
|
void |
removeAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
Unimplemented.
|
Node |
removeChild(Node oldChild)
Unimplemented.
|
Node |
renameNode(Node n,
java.lang.String namespaceURI,
java.lang.String name)
DOM Level 3
Renaming node
|
Node |
replaceChild(Node newChild,
Node oldChild)
Unimplemented.
|
void |
replaceData(int offset,
int count,
java.lang.String arg)
Unimplemented.
|
Text |
replaceWholeText(java.lang.String content)
DOM Level 3
|
void |
setActualEncoding(java.lang.String value)
DOM Level 3
An attribute specifying the actual encoding of this document.
|
void |
setAttribute(java.lang.String name,
java.lang.String value)
Unimplemented.
|
Attr |
setAttributeNode(Attr newAttr)
Unimplemented.
|
Attr |
setAttributeNodeNS(Attr newAttr)
Unimplemented.
|
void |
setAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName,
java.lang.String value)
Unimplemented.
|
void |
setData(java.lang.String data)
Set Node data
|
void |
setDocumentURI(java.lang.String documentURI)
DOM Level 3
|
void |
setIdAttribute(boolean id)
NON-DOM: set the type of this attribute to be ID type.
|
void |
setIdAttribute(java.lang.String name,
boolean makeId)
DOM Level 3: register the given attribute node as an ID attribute
|
void |
setIdAttributeNode(Attr at,
boolean makeId)
DOM Level 3: register the given attribute node as an ID attribute
|
void |
setIdAttributeNS(java.lang.String namespaceURI,
java.lang.String localName,
boolean makeId)
DOM Level 3: register the given attribute node as an ID attribute
|
void |
setInputEncoding(java.lang.String encoding)
|
void |
setNodeValue(java.lang.String nodeValue)
Unimplemented.
|
void |
setPrefix(java.lang.String prefix)
Unimplemented.
|
void |
setStrictErrorChecking(boolean strictErrorChecking)
|
void |
setTextContent(java.lang.String textContent)
This attribute returns the text content of this node and its
descendants.
|
java.lang.Object |
setUserData(java.lang.String key,
java.lang.Object data,
UserDataHandler handler)
Associate an object to a key on this node.
|
void |
setValue(java.lang.String value)
Unimplemented.
|
void |
setXmlEncoding(java.lang.String xmlEncoding) |
void |
setXmlStandalone(boolean xmlStandalone)
An attribute specifying, as part of the XML declaration, whether this document is standalone.
|
void |
setXmlVersion(java.lang.String xmlVersion)
An attribute specifying, as part of the XML declaration, the version number of this document.
|
Text |
splitText(int offset)
Unimplemented.
|
java.lang.String |
substringData(int offset,
int count)
Unimplemented.
|
public void error(java.lang.String msg)
msg - Message Key for the errorpublic void error(java.lang.String msg,
java.lang.Object[] args)
msg - Message Key for the errorargs - Array of arguments to be used in the error messagepublic Node appendChild(Node newChild) throws DOMException
appendChild in interface NodenewChild - New node to append to the list of this node's childrenDOMExceptionpublic boolean hasChildNodes()
hasChildNodes in interface Nodepublic short getNodeType()
getNodeType in interface Nodepublic Node getParentNode()
getParentNode in interface Nodepublic NodeList getChildNodes()
getChildNodes in interface Nodepublic Node getFirstChild()
getFirstChild in interface Nodepublic Node getLastChild()
getLastChild in interface Nodepublic Node getNextSibling()
getNextSibling in interface Nodepublic int getLength()
public Node item(int index)
public Document getOwnerDocument()
getOwnerDocument in interface Nodepublic java.lang.String getTagName()
getTagName in interface Elementpublic java.lang.String getNodeName()
getNodeName in interface Nodepublic void normalize()
public NodeList getElementsByTagName(java.lang.String name)
getElementsByTagName in interface DocumentgetElementsByTagName in interface Elementname - Name of the elementpublic Attr removeAttributeNode(Attr oldAttr) throws DOMException
removeAttributeNode in interface ElementoldAttr - Attribute to be removed from this node's list of attributesDOMExceptionpublic Attr setAttributeNode(Attr newAttr) throws DOMException
setAttributeNode in interface ElementnewAttr - Attribute node to be added to this node's list of attributesDOMExceptionpublic boolean hasAttribute(java.lang.String name)
hasAttribute in interface Elementname - Name of an attributepublic boolean hasAttributeNS(java.lang.String name,
java.lang.String x)
hasAttributeNS in interface Elementname - x - public Attr getAttributeNode(java.lang.String name)
getAttributeNode in interface Elementname - Attribute node namepublic void removeAttribute(java.lang.String name)
throws DOMException
removeAttribute in interface Elementname - Attribute node name to remove from list of attributesDOMExceptionpublic void setAttribute(java.lang.String name,
java.lang.String value)
throws DOMException
setAttribute in interface Elementname - Name of attribute to setvalue - Value of attributeDOMExceptionpublic java.lang.String getAttribute(java.lang.String name)
getAttribute in interface Elementname - Name of attribute to getpublic boolean hasAttributes()
hasAttributes in interface Nodepublic NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
getElementsByTagNameNS in interface DocumentgetElementsByTagNameNS in interface ElementnamespaceURI - Namespace URI of the elementlocalName - Local part of qualified name of the elementpublic Attr setAttributeNodeNS(Attr newAttr) throws DOMException
setAttributeNodeNS in interface ElementnewAttr - Attribute to setDOMExceptionpublic Attr getAttributeNodeNS(java.lang.String namespaceURI, java.lang.String localName)
getAttributeNodeNS in interface ElementnamespaceURI - Namespace URI of attribute node to getlocalName - Local part of qualified name of attribute node to getpublic void removeAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
throws DOMException
removeAttributeNS in interface ElementnamespaceURI - Namespace URI of attribute node to removelocalName - Local part of qualified name of attribute node to removeDOMExceptionpublic void setAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName,
java.lang.String value)
throws DOMException
setAttributeNS in interface ElementnamespaceURI - Namespace URI of attribute node to set
NEEDSDOC @param qualifiedNamevalue - value of attributequalifiedName - The qualified name of the attribute to create or
alter.DOMExceptionpublic java.lang.String getAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
getAttributeNS in interface ElementnamespaceURI - Namespace URI of attribute node to getlocalName - Local part of qualified name of attribute node to getpublic Node getPreviousSibling()
getPreviousSibling in interface Nodepublic Node cloneNode(boolean deep)
public java.lang.String getNodeValue()
throws DOMException
getNodeValue in interface NodeDOMExceptionpublic void setNodeValue(java.lang.String nodeValue)
throws DOMException
setNodeValue in interface NodenodeValue - Value to set this node toDOMExceptionpublic void setValue(java.lang.String value)
throws DOMException
value - Value to set this node toDOMExceptionpublic Element getOwnerElement()
public boolean getSpecified()
public NamedNodeMap getAttributes()
getAttributes in interface Nodepublic Node insertBefore(Node newChild, Node refChild) throws DOMException
insertBefore in interface NodenewChild - New child node to insertrefChild - Insert in front of this childDOMExceptionpublic Node replaceChild(Node newChild, Node oldChild) throws DOMException
replaceChild in interface NodenewChild - Replace existing child with this oneoldChild - Existing child to be replacedDOMExceptionpublic Node removeChild(Node oldChild) throws DOMException
removeChild in interface NodeoldChild - Child to be removedDOMExceptionpublic boolean isSupported(java.lang.String feature,
java.lang.String version)
isSupported in interface Nodefeature - The name of the feature to test. This is the same name
which can be passed to the method hasFeature on
DOMImplementation.version - This is the version number of the feature to test. In
Level 2, version 1, this is the string "2.0". If the version is not
specified, supporting any version of the feature will cause the
method to return true.falsepublic java.lang.String getNamespaceURI()
getNamespaceURI in interface Nodepublic java.lang.String getPrefix()
public void setPrefix(java.lang.String prefix)
throws DOMException
setPrefix in interface Nodeprefix - Prefix to set for this nodeDOMExceptionpublic java.lang.String getLocalName()
getLocalName in interface Nodepublic DocumentType getDoctype()
getDoctype in interface Documentpublic DOMImplementation getImplementation()
getImplementation in interface Documentpublic Element getDocumentElement()
getDocumentElement in interface Documentpublic Element createElement(java.lang.String tagName) throws DOMException
createElement in interface DocumenttagName - Element tag nameDOMExceptionpublic DocumentFragment createDocumentFragment()
createDocumentFragment in interface Documentpublic Text createTextNode(java.lang.String data)
createTextNode in interface Documentdata - Data for text nodepublic Comment createComment(java.lang.String data)
createComment in interface Documentdata - Data for commentpublic CDATASection createCDATASection(java.lang.String data) throws DOMException
createCDATASection in interface Documentdata - Data for CDATA sectionDOMExceptionpublic ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data) throws DOMException
createProcessingInstruction in interface Documenttarget - Target for Processing instructiondata - Data for Processing instructionDOMExceptionpublic Attr createAttribute(java.lang.String name) throws DOMException
createAttribute in interface Documentname - Attribute nameDOMExceptionpublic EntityReference createEntityReference(java.lang.String name) throws DOMException
createEntityReference in interface Documentname - Entity Reference nameDOMExceptionpublic Node importNode(Node importedNode, boolean deep) throws DOMException
importNode in interface DocumentimportedNode - The node to import.deep - If true, recursively import the subtree under
the specified node; if false, import only the node
itself, as explained above. This has no effect on Attr
, EntityReference, and Notation nodes.DOMExceptionpublic Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName) throws DOMException
createElementNS in interface DocumentnamespaceURI - Namespace URI for the elementqualifiedName - Qualified name of the elementDOMExceptionpublic Attr createAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName) throws DOMException
createAttributeNS in interface DocumentnamespaceURI - Namespace URI of the attributequalifiedName - Qualified name of the attributeDOMExceptionpublic Element getElementById(java.lang.String elementId)
getElementById in interface DocumentelementId - ID of the element to getpublic void setData(java.lang.String data)
throws DOMException
data - data to set for this nodeDOMExceptionpublic java.lang.String substringData(int offset,
int count)
throws DOMException
offset - Start offset of substring to extract.count - The length of the substring to extract.DOMExceptionpublic void appendData(java.lang.String arg)
throws DOMException
arg - String data to appendDOMExceptionpublic void insertData(int offset,
java.lang.String arg)
throws DOMException
offset - Start offset of substring to insert.
NEEDSDOC @param argDOMExceptionpublic void deleteData(int offset,
int count)
throws DOMException
offset - Start offset of substring to delete.count - The length of the substring to delete.DOMExceptionpublic void replaceData(int offset,
int count,
java.lang.String arg)
throws DOMException
offset - Start offset of substring to replace.count - The length of the substring to replace.arg - substring to replace withDOMExceptionpublic Text splitText(int offset) throws DOMException
offset - Offset into text to splitDOMExceptionpublic Node adoptNode(Node source) throws DOMException
adoptNode in interface Documentsource - The node to move into this document.null if this operation
fails, such as when the source node comes from a different
implementation.DOMExceptionpublic java.lang.String 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 null when unspecified.
getInputEncoding in interface Documentpublic void setInputEncoding(java.lang.String encoding)
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 null when unspecified.
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 any DOMException. In case of error, the
behavior is undefined. This attribute is true by
defaults.
getStrictErrorChecking in interface Documentpublic 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 any DOMException. In case of error, the
behavior is undefined. This attribute is true by
defaults.
setStrictErrorChecking in interface Documentpublic java.lang.Object setUserData(java.lang.String key,
java.lang.Object data,
UserDataHandler handler)
NodegetUserData with the
same key.setUserData in interface Nodekey - The key to associate the object to.data - The object to associate to the given key, or
null to remove any existing association to that key.handler - The handler to associate to that key, or
null.DOMUserData previously associated to
the given key on this node, or null if there was none.public java.lang.Object getUserData(java.lang.String key)
setUserData with the same key.getUserData in interface Nodekey - The key the object is associated to.DOMObject associated to the given key
on this node, or null if there was none.public java.lang.Object getFeature(java.lang.String feature,
java.lang.String version)
getFeature in interface Nodefeature - The name of the feature requested (case-insensitive).version - This is the version number of the feature to test. If
the version is null or 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.null if
there is no object which implements interfaces associated with that
feature. If the DOMObject returned by this method
implements the Node interface, it must delegate to the
primary core Node and not return results inconsistent
with the primary core Node such as attributes,
childNodes, etc.public boolean isEqualNode(Node arg)
Node.isSameNode. All nodes that are the same
will also be equal, though the reverse may not be true.
nodeName, localName,
namespaceURI, prefix, nodeValue
, baseURI. This is: they are both null, or
they have the same length and are character for character identical.
The attributes NamedNodeMaps are equal.
This is: they are both null, 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.The childNodes NodeLists are
equal. This is: they are both null, or they have the
same length and contain equal nodes at the same index. This is true
for Attr nodes as for any other type of node. Note that
normalization can affect equality; to avoid this, nodes should be
normalized before being compared.
DocumentType nodes to be equal, the following
conditions must also be satisfied: The following string attributes
are equal: publicId, systemId,
internalSubset.The entities
NamedNodeMaps are equal.The notations
NamedNodeMaps are equal.
ownerDocument attribute, the specified
attribute for Attr nodes, the
isWhitespaceInElementContent attribute for
Text nodes, as well as any user data or event listeners
registered on the nodes.isEqualNode in interface Nodearg - The node to compare equality with.deep - If true, recursively compare the subtrees; if
false, compare only the nodes themselves (and its
attributes, if it is an Element).true otherwise false.public java.lang.String lookupNamespaceURI(java.lang.String specifiedPrefix)
lookupNamespaceURI in interface NodenamespaceURI - public boolean isDefaultNamespace(java.lang.String namespaceURI)
namespaceURI is the
default namespace or not.isDefaultNamespace in interface NodenamespaceURI - The namespace URI to look for.true if the specified namespaceURI
is the default namespace, false otherwise.public java.lang.String lookupPrefix(java.lang.String namespaceURI)
lookupPrefix in interface NodenamespaceURI - public boolean isSameNode(Node other)
Node references returned by the implementation reference
the same object. When two Node references 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.isSameNode in interface Nodeother - The node to test against.true if the nodes are the same,
false otherwise.public void setTextContent(java.lang.String textContent)
throws DOMException
Text node 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.
| Node type | Content |
|---|---|
| ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, DOCUMENT_FRAGMENT_NODE | concatenation of the textContent
attribute value of every child node, excluding COMMENT_NODE and
PROCESSING_INSTRUCTION_NODE nodes |
| ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE |
nodeValue |
| DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE | null |
setTextContent in interface NodeDOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than
fit in a DOMString variable on the implementation
platform.public java.lang.String getTextContent()
throws DOMException
Text node 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.
| Node type | Content |
|---|---|
| ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, DOCUMENT_FRAGMENT_NODE | concatenation of the textContent
attribute value of every child node, excluding COMMENT_NODE and
PROCESSING_INSTRUCTION_NODE nodes |
| ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE |
nodeValue |
| DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE | null |
getTextContent in interface NodeDOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than
fit in a DOMString variable on the implementation
platform.public short compareDocumentPosition(Node other) throws DOMException
compareDocumentPosition in interface Nodeother - The node to compare against this node.DOMException - NOT_SUPPORTED_ERR: when the compared nodes are from different DOM
implementations that do not coordinate to return consistent
implementation-specific results.public java.lang.String getBaseURI()
null if undefined.
This value is computed according to . However, when the
Document supports 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 the documentURI
attribute from the Document interface otherwise.
Element, a Document
or a a ProcessingInstruction, this attribute represents
the properties [base URI] defined in . When the node is a
Notation, an Entity, or an
EntityReference, 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)getBaseURI in interface Nodepublic Node renameNode(Node n, java.lang.String namespaceURI, java.lang.String name) throws DOMException
renameNode in interface Documentn - The node to rename.namespaceURI - The new namespace URI.name - The new qualified name.DOMException - NOT_SUPPORTED_ERR: Raised when the type of the specified node is
neither ELEMENT_NODE nor ATTRIBUTE_NODE,
or if the implementation does not support the renaming of the
document element.
Document.xmlVersion attribute.
qualifiedName is a
malformed qualified name, if the qualifiedName has a
prefix and the namespaceURI is null, or
if the qualifiedName has a prefix that is "xml" and
the namespaceURI is different from "
http://www.w3.org/XML/1998/namespace" [XML Namespaces]
. Also raised, when the node being renamed is an attribute, if the
qualifiedName, or its prefix, is "xmlns" and the
namespaceURI is different from "http://www.w3.org/2000/xmlns/".public void normalizeDocument()
normalizeDocument in interface Documentpublic DOMConfiguration getDomConfig()
Document.normalizeDocument is
invoked.getDomConfig in interface Documentpublic void setDocumentURI(java.lang.String documentURI)
setDocumentURI in interface Documentpublic java.lang.String getDocumentURI()
null if undefined.
Document supports the feature
"HTML" , the href attribute of the HTML BASE element takes precedence
over this attribute.getDocumentURI in interface Documentpublic java.lang.String getActualEncoding()
null otherwise.
public void setActualEncoding(java.lang.String value)
null otherwise.
public Text replaceWholeText(java.lang.String content) throws DOMException
DOMExceptionpublic java.lang.String getWholeText()
Text nodes logically-adjacent text
nodes to this node, concatenated in document order.public boolean isWhitespaceInElementContent()
public void setIdAttribute(boolean id)
id - public void setIdAttribute(java.lang.String name,
boolean makeId)
setIdAttribute in interface Elementname - The name of the attribute.makeId - Whether the attribute is a of type ID.public void setIdAttributeNode(Attr at, boolean makeId)
setIdAttributeNode in interface Elementat - The attribute node.makeId - Whether the attribute is a of type ID.public void setIdAttributeNS(java.lang.String namespaceURI,
java.lang.String localName,
boolean makeId)
setIdAttributeNS in interface ElementnamespaceURI - The namespace URI of the attribute.localName - The local name of the attribute.makeId - Whether the attribute is a of type ID.public TypeInfo getSchemaTypeInfo()
getSchemaTypeInfo in interface Elementpublic boolean isId()
public java.lang.String getXmlEncoding()
Documentnull when
unspecified or when it is not known, such as when the
Document was created in memory.getXmlEncoding in interface Documentpublic void setXmlEncoding(java.lang.String xmlEncoding)
public boolean getXmlStandalone()
Documentfalse 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].
getXmlStandalone in interface Documentpublic void setXmlStandalone(boolean xmlStandalone)
throws DOMException
Documentfalse 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].
setXmlStandalone in interface DocumentDOMException - NOT_SUPPORTED_ERR: Raised if this document does not support the
"XML" feature.public java.lang.String getXmlVersion()
Document"1.0". If this document does not support the "XML"
feature, the value is always null. Changing this
attribute will affect methods that check for invalid characters in
XML names. Application should invoke
Document.normalizeDocument() in order to check for
invalid characters in the Nodes that are already part of
this Document.
DOMImplementation.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 a NOT_SUPPORTED_ERR exception for the same version
number when using Document.xmlVersion.getXmlVersion in interface Documentpublic void setXmlVersion(java.lang.String xmlVersion)
throws DOMException
Document"1.0". If this document does not support the "XML"
feature, the value is always null. Changing this
attribute will affect methods that check for invalid characters in
XML names. Application should invoke
Document.normalizeDocument() in order to check for
invalid characters in the Nodes that are already part of
this Document.
DOMImplementation.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 a NOT_SUPPORTED_ERR exception for the same version
number when using Document.xmlVersion.setXmlVersion in interface DocumentDOMException - NOT_SUPPORTED_ERR: Raised if the version is set to a value that is
not supported by this Document or if this document
does not support the "XML" feature.Copyright © 2014 Apache XML Project. All Rights Reserved.