Interface
|
nodeName
|
nodeValue
|
attributes
|
Attr
|
name of attribute
|
value of attribute
|
null
|
CDATASection
|
#cdata-section
|
content of the CDATA Section
|
null
|
Comment
|
#comment
|
content of the comment
|
null
|
Document
|
#document
|
null
|
null
|
DocumentFragment
|
#document-fragment
|
null
|
null
|
DocumentType
|
document type name
|
null
|
null
|
Element
|
tag name
|
null
|
NamedNodeMap
|
Entity
|
entity name
|
null
|
null
|
EntityReference
|
name of entity referenced
|
null
|
null
|
Notation
|
notation name
|
null
|
null
|
ProcessingInstruction
|
target
|
entire content excluding the target
|
null
|
Text
|
#text
|
content of the text node
|
null
|
|
Numeric codes up to 200 are reserved to W3C for possible future use.
|
attributes
|
|
Access
|
read-only
|
Returns
|
NamedNodeMap
|
childNodes
|
|
Access
|
read-only
|
Returns
|
NodeList
|
firstChild
|
|
Access
|
read-only
|
Returns
|
Node
|
lastChild
|
|
Access
|
read-only
|
Returns
|
Node
|
localName
|
|
Access
|
read-only
|
Returns
|
String
|
|
Per the Namespaces in XML Specification [XML Namespaces] an attribute does not inherit its namespace from the element it is attached to. If an attribute is not explicitly given a namespace, it simply has no namespace.
|
namespaceURI
|
|
Access
|
read-only
|
Returns
|
String
|
nextSibling
|
|
Access
|
read-only
|
Returns
|
Node
|
nodeName
|
|
Access
|
read-only
|
Returns
|
String
|
nodeType
|
|
Access
|
read-only
|
Returns
|
unsigned short
|
nodeValue
|
|
Access
|
read-write
|
Returns
|
String
|
Get throws
|
DOMException
DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.
|
Set throws
|
DOMException
NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
|
ownerDocument
|
|
Access
|
read-only
|
Returns
|
Document
|
parentNode
|
|
Access
|
read-only
|
Returns
|
Node
|
prefix
|
|
Access
|
read-write
|
Returns
|
String
|
Set throws
|
DOMException
INVALID_CHARACTER_ERR: Raised if the specified prefix contains an illegal character.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NAMESPACE_ERR: Raised if the specified prefix is malformed, if the namespaceURI of this node is null, if the specified prefix is "xml" and the namespaceURI of this node is different from the xml namespace, if this node is an attribute and the specified prefix is "xmlns" and the namespaceURI of this node is different from the xml namespace, or if this node is an attribute and the qualifiedName of this node is "xmlns" [XML Namespaces].
|
previousSibling
|
|
Access
|
read-only
|
Returns
|
Node
|
appendChildnewChild
|
|
Parameters
|
NodenewChild
The node to add.
If it is a DocumentFragment object, the entire contents of the document fragment are moved into the child list of this node
|
Returns
|
Node. The node added.
|
Throws
|
DOMException
HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to append is one of this node's ancestors.
WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
|
cloneNodedeep
|
|
Parameters
|
booleandeep
If true, recursively clone the subtree under the specified node; if false, clone only the node itself (and its attributes, if it is an Element).
|
Returns
|
Node. The duplicate node.
|
compareDocumentPositionother
|
|
Parameters
|
Nodeother
The node to compare against this node.
|
Returns
|
unsigned short. 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.
|
hasAttributes
|
|
Parameters
|
None
|
Returns
|
trueboolean. if this node has any attributes, false otherwise.
|
hasChildNodes
|
|
Parameters
|
None
|
Returns
|
booleantrue if this node has any children, false otherwise.
|
insertBeforenewChildrefChild
|
|
Parameters
|
NodenewChild
The node to insert.
NoderefChild
[optional] The reference node, i.e., the node before which the new node must be inserted.
|
Returns
|
Node. The node being inserted.
|
Throws
|
DOMException
HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to insert is one of this node's ancestors.
WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or if the parent of the node being inserted is readonly.
NOT_FOUND_ERR: Raised if refChild is not a child of this node.
|
isSupportedfeatureversion
|
|
Parameters
|
Stringfeature
The name of the feature to test. This is the same name which can be passed to the method hasFeature on DOMImplementation.
Stringversion
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.
|
Returns
|
boolean. Returns true if the specified feature is supported on this node, false otherwise.
|
lookupNamespaceURIprefix
|
|
Parameters
|
Stringprefix
The prefix to look for. If this parameter is null, the method will return the default namespace URI if any.
|
Returns
|
String. Returns the associated namespace URI or null if none is found.
|
|
In cases where the document contains CDATASections, the normalize operation alone may not be sufficient, since XPointers do not differentiate between Text nodes and CDATASection nodes.
|
normalize
|
|
Parameters
|
None
|
Returns
|
void
|
removeChildoldChild
|
|
Parameters
|
NodeoldChild
The node being removed.
|
Returns
|
Node. The node removed.
|
Throws
|
DOMException
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NOT_FOUND_ERR: Raised if oldChild is not a child of this node.
|
replaceChildnewChildoldChild
|
|
Parameters
|
NodenewChild
The new node to put in the child list.
NodeoldChild
The node being replaced in the list.
|
Returns
|
Node. The node replaced.
|
Throws
|
DOMException
HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to put in is one of this node's ancestors.
WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of the new node is readonly.
NOT_FOUND_ERR: Raised if oldChild is not a child of this node.
|