Inheritance diagram for DOM_Document:
Factory methods to create new nodes for the Document | |
DOM_Entity | createEntity (const DOMString &name) |
DOM_Element | createElement (const DOMString &tagName) |
DOM_Element | createElement (const XMLCh *tagName) |
DOM_DocumentFragment | createDocumentFragment () |
DOM_Text | createTextNode (const DOMString &data) |
DOM_Comment | createComment (const DOMString &data) |
DOM_CDATASection | createCDATASection (const DOMString &data) |
DOM_DocumentType | createDocumentType (const DOMString &name) |
DOM_Notation | createNotation (const DOMString &name) |
DOM_ProcessingInstruction | createProcessingInstruction (const DOMString &target, const DOMString &data) |
DOM_Attr | createAttribute (const DOMString &name) |
DOM_EntityReference | createEntityReference (const DOMString &name) |
DOM_NodeIterator | createNodeIterator (DOM_Node root, unsigned long whatToShow, DOM_NodeFilter *filter, bool entityReferenceExpansion) |
DOM_TreeWalker | createTreeWalker (DOM_Node root, unsigned long whatToShow, DOM_NodeFilter *filter, bool entityReferenceExpansion) |
DOM_XMLDecl | createXMLDecl (const DOMString &version, const DOMString &encoding, const DOMString &standalone) |
DOM_Range | createRange () |
DOM_Document | createDocument () |
Public Methods | |
Constructors and assignment operators | |
DOM_Document () | |
DOM_Document (const DOM_Document &other) | |
DOM_Document & | operator= (const DOM_Document &other) |
DOM_Document & | operator= (const DOM_NullPtr *val) |
Destructor | |
~DOM_Document () | |
Getter functions | |
DOM_DocumentType | getDoctype () const |
DOM_DOMImplementation & | getImplementation () const |
DOM_Element | getDocumentElement () const |
DOM_NodeList | getElementsByTagName (const DOMString &tagname) const |
Functions introduced in DOM Level 2. | |
DOM_Node | importNode (const DOM_Node &importedNode, bool deep) |
DOM_Element | createElementNS (const DOMString &namespaceURI, const DOMString &qualifiedName) |
DOM_Attr | createAttributeNS (const DOMString &namespaceURI, const DOMString &qualifiedName) |
DOM_NodeList | getElementsByTagNameNS (const DOMString &namespaceURI, const DOMString &localName) const |
DOM_Element | getElementById (const DOMString &elementId) |
void | setErrorChecking (bool check) |
bool | getErrorChecking () |
Protected Methods | |
DOM_Document (DocumentImpl *impl) | |
Friends | |
class | DOM_Node |
class | DocumentImpl |
class | NodeIteratorImpl |
class | DOM_DOMImplementation |
Conceptually, a DOM document node 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.
|
The default constructor for DOM_Document creates a null DOM_Document object that refers to no document. It may subsequently be assigned to refer to an actual Document node.
To create a new document, use the static method |
|
Copy constructor. Creates a new
|
|
Destructor. The object being destroyed is the reference object, not the underlying Document itself. The reference counting memory management will delete the underlying document itself if this DOM_Document is the last remaining to refer to the Document, and if there are no remaining references to any of the nodes within the document tree. If other live references do remain, the underlying document itself remains also. |
|
Creates an Attr of the given name.
Note that the
|
|
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.
|
|
Create a new empty document.
This differs from the This function is an extension to the DOM API, which lacks any mechanism for the creation of new documents.
|
|
Creates an empty DocumentFragment object.
|
|
Create a DocumentType node. Non-standard extension.
|
|
Creates an element of the type specified. This non-standard overload of createElement, with the name specified as raw Unicode string, is intended for use from XML parsers, and is the best performing way to create elements. The name string is not checked for conformance to the XML rules for valid element names.
|
|
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.
|
|
Creates an element of the given qualified name and namespace URI.
|
|
Create a new entity. Non-standard extension.
|
|
Creates an EntityReference object.
|
|
Creates a NodeIterator object. (DOM2)
NodeIterators are used to step through a set of nodes, e.g. the set of nodes in a NodeList, the document subtree governed by a particular node, the results of a query, or any other set of nodes. The set of nodes to be iterated is determined by the implementation of the NodeIterator. DOM Level 2 specifies a single NodeIterator implementation for document-order traversal of a document subtree. Instances of these iterators are created by calling
To produce a view of the document that has entity references expanded and does not expose the entity reference node itself, use the
|
|
Create a Notation. Non-standard extension.
|
|
Creates a ProcessingInstruction node given the specified name and data strings.
|
|
To create the range consisting of boundary-points and offset of the selected contents
|
|
Creates a Text node given the specified string.
|
|
Creates a TreeWalker object. (DOM2) TreeWalker objects are used to navigate a document tree or subtree using the view of the document defined by its whatToShow flags and any filters that are defined for the TreeWalker. Any function which performs navigation using a TreeWalker will automatically support any view defined by a TreeWalker. Omitting nodes from the logical view of a subtree can result in a structure that is substantially different from the same subtree in the complete, unfiltered document. Nodes that are siblings in the TreeWalker view may be children of different, widely separated nodes in the original view. For instance, consider a Filter that skips all nodes except for Text nodes and the root node of a document. In the logical view that results, all text nodes will be siblings and appear as direct children of the root node, no matter how deeply nested the structure of the original document.
To produce a view of the document that has entity references expanded and does not expose the entity reference node itself, use the whatToShow flags to hide the entity reference node and set
|
|
Creates a XMLDecl type Node . Non-Standard (an extension to xerces) XMLDecl Nodes are created to get version, encoding and standalone information in a document tree This node if created gets attached to a document object or an entity node. There can be no child to this type of node.
|
|
Get Document Type Declaration (see
For documents without a document type declaration this returns |
|
Return a reference to the root element of the document. |
|
Returns the
Note: 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
|
|
Returns a
The elements in the node list are ordered in the same order in which they would be encountered in a preorder traversal of the
|
|
Returns a
|
|
Returns true if the DOM implementation performs error checking. |
|
Return the |
|
Imports a node from another document to this document. The returned node has no parent (
|
|
Assignment operator. This overloaded variant is provided for the sole purpose of setting a DOM_Node reference variable to zero. Nulling out a reference variable in this way will decrement the reference count on the underlying Node object that the variable formerly referenced. This effect is normally obtained when reference variable goes out of scope, but zeroing them can be useful for global instances, or for local instances that will remain in scope for an extended time, when the storage belonging to the underlying node needs to be reclaimed.
Reimplemented from DOM_Node. |
|
Assignment operator
|
|
Sets whether the DOM implementation performs error checking upon operations. Turning off error checking only affects the following DOM checks:
Turning off error checking does not turn off the following checks:
|