|
doctype
|
|
|
Access
|
read-only
|
|
Returns
|
DocumentType
|
|
documentElement
|
|
|
Access
|
read-only
|
|
Returns
|
Element
|
|
implementation
|
|
|
Access
|
read-only
|
|
Returns
|
DOMImplementation
|
|
createAttribute name
|
|
|
Parameters
|
String name
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.
|
|
createAttributeNS namespaceURI qualifiedName
|
|
|
Parameters
|
String namespaceURI
The namespace URI of the attribute to create.
String qualifiedName
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.
|
|
createCDATASection data
|
|
|
Parameters
|
String data
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.
|
|
createComment data
|
|
|
Parameters
|
String data
The data for the node.
|
|
Returns
|
Comment. The new Comment object.
|
|
createDocumentFragment
|
|
|
Parameters
|
None
|
|
Returns
|
DocumentFragment. A new DocumentFragment.
|
|
createElement tagName
|
|
|
Parameters
|
String tagName
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.
|
|
createElementNS namespaceURI qualifiedName
|
|
|
Parameters
|
String namespaceURI
The namespace URI of the element to create.
String qualifiedName
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.
|
|
createEntityReference name
|
|
|
Parameters
|
String name
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.
|
|
createProcessingInstruction target data
|
|
|
Parameters
|
String target
The target part of the processing instruction.
String data
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.
|
|
createTextNode data
|
|
|
Parameters
|
String data
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.
|
|
getElementById elementId
|
|
|
Parameters
|
String elementId
The unique id value for an element.
|
|
Returns
|
Element. The matching element.
|
|
getElementsByTagName tagName
|
|
|
Parameters
|
String tagName
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.
|
|
getElementsByTagNameNS namespaceURI localName
|
|
|
Parameters
|
String namespaceURI
The namespace URI of the elements to match on. The special value "*" matches all namespaces.
String localName
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.
|
|
importNode importedNode deep
|
|
|
Parameters
|
Node importedNode
The node to import.
boolean 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.
|
|
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.
|