doctype
|
|
Access
|
read-only
|
Returns
|
DocumentType
|
documentElement
|
|
Access
|
read-only
|
Returns
|
Element
|
implementation
|
|
Access
|
read-only
|
Returns
|
DOMImplementation
|
createAttributename
|
|
Parameters
|
Stringname
The name of the attribute.
|
Returns
|
Attr. A new Attr object with the nodeName attribute set to name, and localName, prefix, and namespaceURI set to null. The value of the attribute is the empty string.
|
Throws
|
DOMException
INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
|
createAttributeNSnamespaceURIqualifiedName
|
|
Parameters
|
StringnamespaceURI
The namespace URI of the attribute to create.
StringqualifiedName
The qualified name of the attribute to instantiate.
|
Returns
|
Attr. A new Attr object with the following attributes:
Node.nodeName
qualifiedName
Node.namespaceURI
namespaceURI
Node.prefix
prefix, extracted from qualifiedName, or null if there is no prefix
Node.localName
local name, extracted from qualifiedName
Attr.name
qualifiedName
Node.nodeValue
the empty string
|
Throws
|
DOMException
INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character.
NAMESPACE_ERR: Raised if the qualifiedName is malformed, if the qualifiedName has a prefix and the namespaceURI is null, if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from the xml namespace, or if the qualifiedName is "xmlns" and the namespaceURI is different from the xml namespace.
|
createCDATASectiondata
|
|
Parameters
|
Stringdata
The data for the CDATASection contents.
|
Returns
|
CDATASection. The new CDATASection object.
|
Throws
|
DOMException
NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
|
createCommentdata
|
|
Parameters
|
Stringdata
The data for the node.
|
Returns
|
Comment. The new Comment object.
|
createDocumentFragment
|
|
Parameters
|
None
|
Returns
|
DocumentFragment. A new DocumentFragment.
|
createElementtagName
|
|
Parameters
|
StringtagName
The name of the element type to instantiate. For XML, this is case-sensitive. For HTML, the tagName parameter may be provided in any case, but it must be mapped to the canonical uppercase form by the DOM implementation.
|
Returns
|
Element. A new Element object with the nodeName attribute set to tagName, and localName, prefix, and namespaceURI set to null.
|
Throws
|
DOMException
INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
|
createElementNSnamespaceURIqualifiedName
|
|
Parameters
|
StringnamespaceURI
The namespace URI of the element to create.
StringqualifiedName
The qualified name of the element type to instantiate.
|
Returns
|
Element. A new Element object with the following attributes:
Node.nodeName
qualifiedName
Node.namespaceURI
namespaceURI
Node.prefix
prefix, extracted from qualifiedName, or null if there is no prefix
Node.localName
local name, extracted from qualifiedName
Element.tagName
qualifiedName
|
Throws
|
DOMException
INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character.
NAMESPACE_ERR: Raised if the qualifiedName is malformed, 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 the XML namespace. [XML Namespaces].
|
|
If any descendant of the Entity node has an unbound namespace prefix, the corresponding descendant of the created EntityReference node is also unbound; (its namespaceURI is null). The DOM Level 2 does not support any mechanism to resolve namespace prefixes.
|
createEntityReferencename
|
|
Parameters
|
Stringname
The name of the entity to reference.
|
Returns
|
EntityReference. The new EntityReference object.
|
Throws
|
DOMException
INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
|
createProcessingInstructiontargetdata
|
|
Parameters
|
Stringtarget
The target part of the processing instruction.
Stringdata
The data for the node.
|
Returns
|
ProcessingInstruction. The new ProcessingInstruction object.
|
Throws
|
DOMException
INVALID_CHARACTER_ERR: Raised if the specified target contains an illegal character.
NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
|
createTextNodedata
|
|
Parameters
|
Stringdata
The data for the node.
|
Returns
|
Text. The new Text object.
|
|
The DOM implementation must have information that says which attributes are of type ID. Attributes with the name "ID" are not of type ID unless so defined. Implementations that do not know whether attributes are of type ID or not are expected to return null.
|
getElementByIdelementId
|
|
Parameters
|
StringelementId
The unique id value for an element.
|
Returns
|
Element. The matching element.
|
getElementsByTagNametagName
|
|
Parameters
|
StringtagName
The name of the tag to match on. The special value "*" matches all tags.
|
Returns
|
NodeList. A new NodeList object containing all the matched Elements.
|
getElementsByTagNameNSnamespaceURIlocalName
|
|
Parameters
|
StringnamespaceURI
The namespace URI of the elements to match on. The special value "*" matches all namespaces.
StringlocalName
The local name of the elements to match on. The special value "*" matches all local names.
|
Returns
|
NodeList. A new NodeList object containing all the matched Elements.
|
importNodeimportedNodedeep
|
|
Parameters
|
NodeimportedNode
The node to import.
booleandeep
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.
|
Returns
|
Node. The imported node that belongs to this Document.
|
Throws
|
DOMException
NOT_SUPPORTED_ERR: Raised if the type of node being imported is not supported.
|