Class UnImplNode
- Direct Known Subclasses:
ElemTemplateElement
public class UnImplNode extends Object implements Node, Element, NodeList, Document
-
Field Summary
Fields Modifier and Type Field Description protected StringactualEncodingDOM Level 3 feature: Document actualEncodingprotected StringfDocumentURIDOM Level 3 feature: documentURIFields 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 UnImplNode()Constructor UnImplNode -
Method Summary
Modifier and Type Method Description NodeadoptNode(Node source)NEEDSDOC Method adoptNode NEEDSDOC @param source NEEDSDOC (adoptNode) @returnNodeappendChild(Node newChild)Unimplemented.voidappendData(String arg)Unimplemented.NodecloneNode(boolean deep)Unimplemented.shortcompareDocumentPosition(Node other)Compares a node with this node with regard to their position in the document.AttrcreateAttribute(String name)Unimplemented.AttrcreateAttributeNS(String namespaceURI, String qualifiedName)Unimplemented.CDATASectioncreateCDATASection(String data)Unimplemented.CommentcreateComment(String data)Unimplemented.DocumentFragmentcreateDocumentFragment()Unimplemented.ElementcreateElement(String tagName)Unimplemented.ElementcreateElementNS(String namespaceURI, String qualifiedName)Unimplemented.EntityReferencecreateEntityReference(String name)Unimplemented.ProcessingInstructioncreateProcessingInstruction(String target, String data)Unimplemented.TextcreateTextNode(String data)Unimplemented.voiddeleteData(int offset, int count)Unimplemented.voiderror(String msg)Throw an error.voiderror(String msg, Object[] args)Throw an error.StringgetActualEncoding()DOM Level 3 An attribute specifying the actual encoding of this document.StringgetAttribute(String name)Unimplemented.AttrgetAttributeNode(String name)Unimplemented.AttrgetAttributeNodeNS(String namespaceURI, String localName)Unimplemented.StringgetAttributeNS(String namespaceURI, String localName)Unimplemented.NamedNodeMapgetAttributes()Unimplemented.StringgetBaseURI()The absolute base URI of this node ornullif undefined.NodeListgetChildNodes()Unimplemented.DocumentTypegetDoctype()Unimplemented.ElementgetDocumentElement()Unimplemented.StringgetDocumentURI()DOM Level 3 The location of the document ornullif undefined.DOMConfigurationgetDomConfig()The configuration used whenDocument.normalizeDocumentis invoked.ElementgetElementById(String elementId)Unimplemented.NodeListgetElementsByTagName(String name)Unimplemented.NodeListgetElementsByTagNameNS(String namespaceURI, String localName)Unimplemented.ObjectgetFeature(String feature, String version)This method returns a specialized object which implements the specialized APIs of the specified feature and version.NodegetFirstChild()Unimplemented.DOMImplementationgetImplementation()Unimplemented.StringgetInputEncoding()NodegetLastChild()Unimplemented.intgetLength()Unimplemented.StringgetLocalName()Unimplemented.StringgetNamespaceURI()Unimplemented.NodegetNextSibling()Unimplemented.StringgetNodeName()Unimplemented.shortgetNodeType()Unimplemented.StringgetNodeValue()Unimplemented.DocumentgetOwnerDocument()Unimplemented.ElementgetOwnerElement()Unimplemented.NodegetParentNode()Unimplemented.StringgetPrefix()Unimplemented.NodegetPreviousSibling()Unimplemented.TypeInfogetSchemaTypeInfo()Method getSchemaTypeInfo.booleangetSpecified()Unimplemented.booleangetStrictErrorChecking()StringgetTagName()Unimplemented.StringgetTextContent()This attribute returns the text content of this node and its descendants.ObjectgetUserData(String key)Retrieves the object associated to a key on a this node.StringgetWholeText()DOM Level 3 Returns all text ofTextnodes logically-adjacent text nodes to this node, concatenated in document order.StringgetXmlEncoding()An attribute specifying, as part of the XML declaration, the encoding of this document.booleangetXmlStandalone()An attribute specifying, as part of the XML declaration, whether this document is standalone.StringgetXmlVersion()An attribute specifying, as part of the XML declaration, the version number of this document.booleanhasAttribute(String name)Unimplemented.booleanhasAttributeNS(String name, String x)Unimplemented.booleanhasAttributes()Unimplemented.booleanhasChildNodes()Unimplemented.NodeimportNode(Node importedNode, boolean deep)Unimplemented.NodeinsertBefore(Node newChild, Node refChild)Unimplemented.voidinsertData(int offset, String arg)Unimplemented.booleanisDefaultNamespace(String namespaceURI)DOM Level 3: This method checks if the specifiednamespaceURIis the default namespace or not.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.booleanisSupported(String feature, String version)Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.booleanisWhitespaceInElementContent()DOM Level 3 Returns whether this text node contains whitespace in element content, often abusively called "ignorable whitespace".Nodeitem(int index)Unimplemented.StringlookupNamespaceURI(String specifiedPrefix)DOM Level 3: Look up the namespace URI associated to the given prefix, starting from this node.StringlookupPrefix(String namespaceURI)DOM Level 3: Look up the prefix associated to the given namespace URI, starting from this node.voidnormalize()Unimplemented.voidnormalizeDocument()DOM Level 3 Normalize document.voidremoveAttribute(String name)Unimplemented.AttrremoveAttributeNode(Attr oldAttr)Unimplemented.voidremoveAttributeNS(String namespaceURI, String localName)Unimplemented.NoderemoveChild(Node oldChild)Unimplemented.NoderenameNode(Node n, String namespaceURI, String name)DOM Level 3 Renaming nodeNodereplaceChild(Node newChild, Node oldChild)Unimplemented.voidreplaceData(int offset, int count, String arg)Unimplemented.TextreplaceWholeText(String content)DOM Level 3voidsetActualEncoding(String value)DOM Level 3 An attribute specifying the actual encoding of this document.voidsetAttribute(String name, String value)Unimplemented.AttrsetAttributeNode(Attr newAttr)Unimplemented.AttrsetAttributeNodeNS(Attr newAttr)Unimplemented.voidsetAttributeNS(String namespaceURI, String qualifiedName, String value)Unimplemented.voidsetData(String data)Set Node datavoidsetDocumentURI(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 attributevoidsetInputEncoding(String encoding)voidsetNodeValue(String nodeValue)Unimplemented.voidsetPrefix(String prefix)Unimplemented.voidsetStrictErrorChecking(boolean strictErrorChecking)voidsetTextContent(String textContent)This attribute returns the text content of this node and its descendants.ObjectsetUserData(String key, Object data, UserDataHandler handler)Associate an object to a key on this node.voidsetValue(String value)Unimplemented.voidsetXmlEncoding(String xmlEncoding)voidsetXmlStandalone(boolean xmlStandalone)An attribute specifying, as part of the XML declaration, whether this document is standalone.voidsetXmlVersion(String xmlVersion)An attribute specifying, as part of the XML declaration, the version number of this document.TextsplitText(int offset)Unimplemented.StringsubstringData(int offset, int count)Unimplemented.
-
Field Details
-
fDocumentURI
DOM Level 3 feature: documentURI -
actualEncoding
DOM Level 3 feature: Document actualEncoding
-
-
Constructor Details
-
UnImplNode
public UnImplNode()Constructor UnImplNode
-
-
Method Details
-
error
Throw an error.- Parameters:
msg- Message Key for the error
-
error
Throw an error.- Parameters:
msg- Message Key for the errorargs- Array of arguments to be used in the error message
-
appendChild
Unimplemented. See org.w3c.dom.Node- Specified by:
appendChildin interfaceNode- Parameters:
newChild- New node to append to the list of this node's children- Returns:
- null
- Throws:
DOMException
-
hasChildNodes
public boolean hasChildNodes()Unimplemented. See org.w3c.dom.Node- Specified by:
hasChildNodesin interfaceNode- Returns:
- false
-
getNodeType
public short getNodeType()Unimplemented. See org.w3c.dom.Node- Specified by:
getNodeTypein interfaceNode- Returns:
- 0
-
getParentNode
Unimplemented. See org.w3c.dom.Node- Specified by:
getParentNodein interfaceNode- Returns:
- null
-
getChildNodes
Unimplemented. See org.w3c.dom.Node- Specified by:
getChildNodesin interfaceNode- Returns:
- null
-
getFirstChild
Unimplemented. See org.w3c.dom.Node- Specified by:
getFirstChildin interfaceNode- Returns:
- null
-
getLastChild
Unimplemented. See org.w3c.dom.Node- Specified by:
getLastChildin interfaceNode- Returns:
- null
-
getNextSibling
Unimplemented. See org.w3c.dom.Node- Specified by:
getNextSiblingin interfaceNode- Returns:
- null
-
getLength
public int getLength()Unimplemented. See org.w3c.dom.NodeList -
item
Unimplemented. See org.w3c.dom.NodeList -
getOwnerDocument
Unimplemented. See org.w3c.dom.Node- Specified by:
getOwnerDocumentin interfaceNode- Returns:
- null
-
getTagName
Unimplemented. See org.w3c.dom.Node- Specified by:
getTagNamein interfaceElement- Returns:
- null
-
getNodeName
Unimplemented. See org.w3c.dom.Node- Specified by:
getNodeNamein interfaceNode- Returns:
- null
-
normalize
public void normalize()Unimplemented. See org.w3c.dom.Node -
getElementsByTagName
Unimplemented. See org.w3c.dom.Element- Specified by:
getElementsByTagNamein interfaceDocument- Specified by:
getElementsByTagNamein interfaceElement- Parameters:
name- Name of the element- Returns:
- null
-
removeAttributeNode
Unimplemented. See org.w3c.dom.Element- Specified by:
removeAttributeNodein interfaceElement- Parameters:
oldAttr- Attribute to be removed from this node's list of attributes- Returns:
- null
- Throws:
DOMException
-
setAttributeNode
Unimplemented. See org.w3c.dom.Element- Specified by:
setAttributeNodein interfaceElement- Parameters:
newAttr- Attribute node to be added to this node's list of attributes- Returns:
- null
- Throws:
DOMException
-
hasAttribute
Unimplemented. See org.w3c.dom.Element- Specified by:
hasAttributein interfaceElement- Parameters:
name- Name of an attribute- Returns:
- false
-
hasAttributeNS
Unimplemented. See org.w3c.dom.Element- Specified by:
hasAttributeNSin interfaceElement- Parameters:
name-x-- Returns:
- false
-
getAttributeNode
Unimplemented. See org.w3c.dom.Element- Specified by:
getAttributeNodein interfaceElement- Parameters:
name- Attribute node name- Returns:
- null
-
removeAttribute
Unimplemented. See org.w3c.dom.Element- Specified by:
removeAttributein interfaceElement- Parameters:
name- Attribute node name to remove from list of attributes- Throws:
DOMException
-
setAttribute
Unimplemented. See org.w3c.dom.Element- Specified by:
setAttributein interfaceElement- Parameters:
name- Name of attribute to setvalue- Value of attribute- Throws:
DOMException
-
getAttribute
Unimplemented. See org.w3c.dom.Element- Specified by:
getAttributein interfaceElement- Parameters:
name- Name of attribute to get- Returns:
- null
-
hasAttributes
public boolean hasAttributes()Unimplemented. Introduced in DOM Level 2.- Specified by:
hasAttributesin interfaceNode- Returns:
- false
-
getElementsByTagNameNS
Unimplemented. See org.w3c.dom.Element- Specified by:
getElementsByTagNameNSin interfaceDocument- Specified by:
getElementsByTagNameNSin interfaceElement- Parameters:
namespaceURI- Namespace URI of the elementlocalName- Local part of qualified name of the element- Returns:
- null
-
setAttributeNodeNS
Unimplemented. See org.w3c.dom.Element- Specified by:
setAttributeNodeNSin interfaceElement- Parameters:
newAttr- Attribute to set- Returns:
- null
- Throws:
DOMException
-
getAttributeNodeNS
Unimplemented. See org.w3c.dom.Element- Specified by:
getAttributeNodeNSin interfaceElement- Parameters:
namespaceURI- Namespace URI of attribute node to getlocalName- Local part of qualified name of attribute node to get- Returns:
- null
-
removeAttributeNS
Unimplemented. See org.w3c.dom.Element- Specified by:
removeAttributeNSin interfaceElement- Parameters:
namespaceURI- Namespace URI of attribute node to removelocalName- Local part of qualified name of attribute node to remove- Throws:
DOMException
-
setAttributeNS
public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMExceptionUnimplemented. See org.w3c.dom.Element- Specified by:
setAttributeNSin interfaceElement- Parameters:
namespaceURI- Namespace URI of attribute node to set NEEDSDOC @param qualifiedNamevalue- value of attributequalifiedName- The qualified name of the attribute to create or alter.- Throws:
DOMException
-
getAttributeNS
Unimplemented. See org.w3c.dom.Element- Specified by:
getAttributeNSin interfaceElement- Parameters:
namespaceURI- Namespace URI of attribute node to getlocalName- Local part of qualified name of attribute node to get- Returns:
- null
-
getPreviousSibling
Unimplemented. See org.w3c.dom.Node- Specified by:
getPreviousSiblingin interfaceNode- Returns:
- null
-
cloneNode
Unimplemented. See org.w3c.dom.Node -
getNodeValue
Unimplemented. See org.w3c.dom.Node- Specified by:
getNodeValuein interfaceNode- Returns:
- null
- Throws:
DOMException
-
setNodeValue
Unimplemented. See org.w3c.dom.Node- Specified by:
setNodeValuein interfaceNode- Parameters:
nodeValue- Value to set this node to- Throws:
DOMException
-
setValue
Unimplemented. See org.w3c.dom.Node- Parameters:
value- Value to set this node to- Throws:
DOMException
-
getOwnerElement
Unimplemented. See org.w3c.dom.Node- Returns:
- null
-
getSpecified
public boolean getSpecified()Unimplemented. See org.w3c.dom.Node- Returns:
- False
-
getAttributes
Unimplemented. See org.w3c.dom.Node- Specified by:
getAttributesin interfaceNode- Returns:
- null
-
insertBefore
Unimplemented. See org.w3c.dom.Node- Specified by:
insertBeforein interfaceNode- Parameters:
newChild- New child node to insertrefChild- Insert in front of this child- Returns:
- null
- Throws:
DOMException
-
replaceChild
Unimplemented. See org.w3c.dom.Node- Specified by:
replaceChildin interfaceNode- Parameters:
newChild- Replace existing child with this oneoldChild- Existing child to be replaced- Returns:
- null
- Throws:
DOMException
-
removeChild
Unimplemented. See org.w3c.dom.Node- Specified by:
removeChildin interfaceNode- Parameters:
oldChild- Child to be removed- Returns:
- null
- Throws:
DOMException
-
isSupported
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.- Specified by:
isSupportedin interfaceNode- Parameters:
feature- The name of the feature to test. This is the same name which can be passed to the methodhasFeatureonDOMImplementation.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 returntrue.- Returns:
- Returns
false - Since:
- DOM Level 2
-
getNamespaceURI
Unimplemented. See org.w3c.dom.Node- Specified by:
getNamespaceURIin interfaceNode- Returns:
- null
-
getPrefix
Unimplemented. See org.w3c.dom.Node -
setPrefix
Unimplemented. See org.w3c.dom.Node- Specified by:
setPrefixin interfaceNode- Parameters:
prefix- Prefix to set for this node- Throws:
DOMException
-
getLocalName
Unimplemented. See org.w3c.dom.Node- Specified by:
getLocalNamein interfaceNode- Returns:
- null
-
getDoctype
Unimplemented. See org.w3c.dom.Document- Specified by:
getDoctypein interfaceDocument- Returns:
- null
-
getImplementation
Unimplemented. See org.w3c.dom.Document- Specified by:
getImplementationin interfaceDocument- Returns:
- null
-
getDocumentElement
Unimplemented. See org.w3c.dom.Document- Specified by:
getDocumentElementin interfaceDocument- Returns:
- null
-
createElement
Unimplemented. See org.w3c.dom.Document- Specified by:
createElementin interfaceDocument- Parameters:
tagName- Element tag name- Returns:
- null
- Throws:
DOMException
-
createDocumentFragment
Unimplemented. See org.w3c.dom.Document- Specified by:
createDocumentFragmentin interfaceDocument- Returns:
- null
-
createTextNode
Unimplemented. See org.w3c.dom.Document- Specified by:
createTextNodein interfaceDocument- Parameters:
data- Data for text node- Returns:
- null
-
createComment
Unimplemented. See org.w3c.dom.Document- Specified by:
createCommentin interfaceDocument- Parameters:
data- Data for comment- Returns:
- null
-
createCDATASection
Unimplemented. See org.w3c.dom.Document- Specified by:
createCDATASectionin interfaceDocument- Parameters:
data- Data for CDATA section- Returns:
- null
- Throws:
DOMException
-
createProcessingInstruction
public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMExceptionUnimplemented. See org.w3c.dom.Document- Specified by:
createProcessingInstructionin interfaceDocument- Parameters:
target- Target for Processing instructiondata- Data for Processing instruction- Returns:
- null
- Throws:
DOMException
-
createAttribute
Unimplemented. See org.w3c.dom.Document- Specified by:
createAttributein interfaceDocument- Parameters:
name- Attribute name- Returns:
- null
- Throws:
DOMException
-
createEntityReference
Unimplemented. See org.w3c.dom.Document- Specified by:
createEntityReferencein interfaceDocument- Parameters:
name- Entity Reference name- Returns:
- null
- Throws:
DOMException
-
importNode
Unimplemented. See org.w3c.dom.Document- Specified by:
importNodein interfaceDocument- Parameters:
importedNode- The node to import.deep- Iftrue, recursively import the subtree under the specified node; iffalse, import only the node itself, as explained above. This has no effect onAttr,EntityReference, andNotationnodes.- Returns:
- null
- Throws:
DOMException
-
createElementNS
Unimplemented. See org.w3c.dom.Document- Specified by:
createElementNSin interfaceDocument- Parameters:
namespaceURI- Namespace URI for the elementqualifiedName- Qualified name of the element- Returns:
- null
- Throws:
DOMException
-
createAttributeNS
Unimplemented. See org.w3c.dom.Document- Specified by:
createAttributeNSin interfaceDocument- Parameters:
namespaceURI- Namespace URI of the attributequalifiedName- Qualified name of the attribute- Returns:
- null
- Throws:
DOMException
-
getElementById
Unimplemented. See org.w3c.dom.Document- Specified by:
getElementByIdin interfaceDocument- Parameters:
elementId- ID of the element to get- Returns:
- null
-
setData
Set Node data- Parameters:
data- data to set for this node- Throws:
DOMException
-
substringData
Unimplemented.- Parameters:
offset- Start offset of substring to extract.count- The length of the substring to extract.- Returns:
- null
- Throws:
DOMException
-
appendData
Unimplemented.- Parameters:
arg- String data to append- Throws:
DOMException
-
insertData
Unimplemented.- Parameters:
offset- Start offset of substring to insert. NEEDSDOC @param arg- Throws:
DOMException
-
deleteData
Unimplemented.- Parameters:
offset- Start offset of substring to delete.count- The length of the substring to delete.- Throws:
DOMException
-
replaceData
Unimplemented.- Parameters:
offset- Start offset of substring to replace.count- The length of the substring to replace.arg- substring to replace with- Throws:
DOMException
-
splitText
Unimplemented.- Parameters:
offset- Offset into text to split- Returns:
- null, unimplemented
- Throws:
DOMException
-
adoptNode
NEEDSDOC Method adoptNode NEEDSDOC @param source NEEDSDOC (adoptNode) @return- Specified by:
adoptNodein interfaceDocument- Parameters:
source- The node to move into this document.- Returns:
- The adopted node, or
nullif this operation fails, such as when the source node comes from a different implementation. - 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 NEEDSDOC ($objectName$) @return
-
setInputEncoding
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.- Since:
- DOM Level 3 NEEDSDOC @param encoding
-
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 NEEDSDOC ($objectName$) @return
-
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
Description copied from interface:NodeAssociate an object to a key on this node. The object can later be retrieved from this node by callinggetUserDatawith the same key.- Specified by:
setUserDatain interfaceNode- Parameters:
key- The key to associate the object to.data- The object to associate to the given key, ornullto remove any existing association to that key.handler- The handler to associate to that key, ornull.- Returns:
- Returns the
DOMUserDatapreviously associated to the given key on this node, ornullif there was none.
-
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- NOT_SUPPORTED_ERR: when the compared nodes are from different DOM implementations that do not coordinate to return consistent implementation-specific results.- 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- Parameters:
n- The node to rename.namespaceURI- The new namespace URI.name- 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_NODEnorATTRIBUTE_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.xmlVersionattribute.
WRONG_DOCUMENT_ERR: Raised when the specified node was created from a different document than this document.
NAMESPACE_ERR: Raised if thequalifiedNameis a malformed qualified name, if thequalifiedNamehas a prefix and thenamespaceURIisnull, or if thequalifiedNamehas a prefix that is "xml" and thenamespaceURIis 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 thenamespaceURIis different from "http://www.w3.org/2000/xmlns/".
-
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- Throws:
DOMException
-
getWholeText
DOM Level 3 Returns all text ofTextnodes logically-adjacent text nodes to this node, concatenated in document order.- Since:
- DOM Level 3
-
isWhitespaceInElementContent
public boolean isWhitespaceInElementContent()DOM Level 3 Returns whether this text node contains whitespace in element content, often abusively called "ignorable whitespace". -
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- Parameters:
name- The name of the attribute.makeId- Whether the attribute is a of type ID.
-
setIdAttributeNode
DOM Level 3: register the given attribute node as an ID attribute- Specified by:
setIdAttributeNodein interfaceElement- Parameters:
at- The attribute node.makeId- Whether the attribute is a of type ID.
-
setIdAttributeNS
DOM Level 3: register the given attribute node as an ID attribute- Specified by:
setIdAttributeNSin interfaceElement- Parameters:
namespaceURI- The namespace URI of the attribute.localName- The local name of the attribute.makeId- Whether the attribute is a of type ID.
-
getSchemaTypeInfo
Method getSchemaTypeInfo.- Specified by:
getSchemaTypeInfoin interfaceElement- Returns:
- TypeInfo
-
isId
public boolean isId() -
getXmlEncoding
Description copied from interface:DocumentAn attribute specifying, as part of the XML declaration, the encoding of this document. This isnullwhen unspecified or when it is not known, such as when theDocumentwas created in memory.- Specified by:
getXmlEncodingin interfaceDocument
-
setXmlEncoding
-
getXmlStandalone
public boolean getXmlStandalone()Description copied from interface:DocumentAn attribute specifying, as part of the XML declaration, whether this document is standalone. This isfalsewhen 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:
getXmlStandalonein interfaceDocument
-
setXmlStandalone
Description copied from interface:DocumentAn attribute specifying, as part of the XML declaration, whether this document is standalone. This isfalsewhen 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:
setXmlStandalonein interfaceDocument- Throws:
DOMException- NOT_SUPPORTED_ERR: Raised if this document does not support the "XML" feature.
-
getXmlVersion
Description copied from interface:DocumentAn 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 theNodes 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.Documentobjects supporting a version of the "XMLVersion" feature must not raise aNOT_SUPPORTED_ERRexception for the same version number when usingDocument.xmlVersion.- Specified by:
getXmlVersionin interfaceDocument
-
setXmlVersion
Description copied from interface:DocumentAn 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 theNodes 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.Documentobjects supporting a version of the "XMLVersion" feature must not raise aNOT_SUPPORTED_ERRexception for the same version number when usingDocument.xmlVersion.- Specified by:
setXmlVersionin interfaceDocument- Throws:
DOMException- NOT_SUPPORTED_ERR: Raised if the version is set to a value that is not supported by thisDocumentor if this document does not support the "XML" feature.
-