OScript API/Built-in Package Index |
The Document interface represents the entire HTML or XML document. Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a Document, the Document interface also contains the factory methods needed to create these objects. The Node objects created have a ownerDocument attribute which associates them with the Document within whose context they were created.
Create a new DOMDocument node.
Creates an Attr of the given name.
Creates an attribute of the given qualified name and namespace URI.
Creates a CDATASection node whose value is the specified string.
Creates a Comment node given the specified string.
Creates an empty DocumentFragment object.
Creates an element of the type specified.
Creates an element of the given qualified name and namespace URI.
Creates an EntityReference object.
Creates a ProcessingInstruction node given the specified name and data strings.
Creates a Text node given the specified string.
The Document Type Declaration (see DocumentType) associated with this document.
This is a convenience attribute that allows direct access to the child node that is the root element of the document.
Returns the DOMElement whose ID is given by elementId. If no such element exists, returns undefined.
Returns a NodeList of all the Elements with a given tag name in the order in which they would be encountered in a preorder traversal of the Document tree.
Returns a DOMNodeList of all the DOMElement(s) with a given local name and namespace URI.
The DOMImplementation object that handles this document.
Imports importedNode from another document to this document
Create a new DOMDocument node, to be used to build a DOM tree in memory.
The new DOMDocument node.
Creates an Attr of the given name. Note that the Attr instance can then be set on an Element using the setAttribute method.
The name of the attribute.
A new DOMAttr object.
Creates an attribute of the given qualified name and namespace URI.
The namespace URI of the attribute to create.
The qualified name of the attribute to instantiate.
A new DOMAttr object.
Creates a CDATASection node whose value is the specified string.
The data for the CDATASection node.
A new DOMCDATASection object.
Creates a Comment node given the specified string.
The data for the comment node.
A new DOMComment object.
Creates an empty DocumentFragment object.
A new DOMDocumentFragment object.
Creates an element of the type specified. Note that the instance returned implements the Element interface, so attributes can be specified directly on the returned object. In addition, if there are known attributes with default values, Attr nodes representing them are automatically created and attached to the element.
The name of the element.
A new DOMElement object with the nodeName attribute set to tagName.
Creates an element of the given qualified name and namespace URI.
The namespace URI of the element to be created.
The qualified name of the element type to instantiate.
The newly created DOMElement object.
Creates an EntityReference object. In addition, if the referenced entity is known, the child list of the EntityReference node is made the same as that of the corresponding Entity node.
The name of the entity to reference.
A new DOMEntityReference object.
Creates a ProcessingInstruction node given the specified name and data strings.
The target part of the processing instruction.
The data for the node.
A new DOMProcessingInstruction object.
Creates a Text node given the specified string.
The data for the text node.
A new DOMText object.
The Document Type Declaration (see DocumentType) associated with this document. For HTML documents as well as XML documents without a document type declaration this returns null. The DOM Level 2 does not support editing the Document Type Declaration, therefore docType cannot be altered in any way, including through the use of methods, such as insertNode or removeNode, inherited from Node. Not implemented.
The DOMDocumentType node representing the DTD.
This is a convenience attribute that allows direct access to the child node that is the root element of the document.
The DOMElement that represents the root node.
Returns the DOMElement whose ID is given by elementId. If no such element exists, returns undefined.
The element ID string.
The DOMElement specified by elementID.
Returns a NodeList of all the Elements with a given tag name in the order in which they would be encountered in a preorder traversal of the Document tree.
The name of the tag to match on. The special value "*" matches all tags.
A new NodeList object containing all the matched Elements.
Returns a DOMNodeList of all the DOMElement(s) with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of the DOMDocument tree.
The namespace URI of the elements to match on. The special value "*" matches all namespaces.
The local name of the elements to match on. The special value "*" matches all local names.
The DOMNodeList of all DOMNodes specified by the namespace URI and the local name.
The DOMImplementation object that handles this document. A DOM application may use objects from multiple implementations.
The DOMImplementation object that handles this document.
Imports importedNode from another document to this document If deep is set to TRUE then all children nodes are also imported
The DOMNode to be imported
If TRUE then import all sub nodes
The imported node
Copyright © 2022 OpenText Corporation. All rights reserved. |