Modules Namespace List Class Hierarchy Alphabetical List Compound List Namespace Members Compound Members Related Pages
org::w3c::dom::Document Class Reference#include <Document.h>
Inheritance diagram for org::w3c::dom::Document:
List of all members.
Detailed Description
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.
See also the Document acdk::lang::Object Model (DOM) Level 3 Core Specification.
- Author:
- Roger Rene Kommer
- Version:
- Revision
- 1.13
- Date:
- Date
- 2005/02/05 10:45:37
Member Function Documentation
virtual RDocument org::w3c::dom::Document::addComment |
( |
IN(RString) |
comment |
) |
[virtual] |
|
|
Creates an Attr of the given name.
Note that the Attr instance can then be set on an Element using the setAttributeNode method.
To create an attribute with a qualified name and namespace URI, use the createAttributeNS method. - Parameters:
-
name | The name of the attribute. |
- Returns:
- 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.
- Exceptions:
-
DOMException | INVALID_CHARACTER_ERR: Raised if the specified name is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute. |
Implemented in acdk::xml::dom::XMLDocument, and acdk::xml::libxmldom::LibXMLDocument. |
virtual RComment org::w3c::dom::Document::createComment |
( |
IN(RString) |
s |
) |
[pure virtual] |
|
virtual RDocumentFragment org::w3c::dom::Document::createDocumentFragment |
( |
|
) |
[pure virtual] |
|
|
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.
To create an element with a qualified name and namespace URI, use the createElementNS method. - Parameters:
-
tagName | The name of the element type to instantiate. For XML, this is case-sensitive, otherwise it depends on the case-sensitivity of the markup language in use. In that case, the name is mapped to the canonical form of that markup by the DOM implementation. |
- Returns:
- A new
Element object with the nodeName attribute set to tagName , and localName , prefix , and namespaceURI set to null .
- Exceptions:
-
DOMException | INVALID_CHARACTER_ERR: Raised if the specified name is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute. |
Implemented in acdk::xml::dom::XMLDocument, and acdk::xml::libxmldom::LibXMLDocument. |
|
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. <p >Note: 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 and 3 do not support any mechanism to resolve namespace prefixes in this case. - Parameters:
-
name | The name of the entity to reference.Unlike Document.createElementNS or Document.createAttributeNS , no namespace well-formed checking is done on the entity name. Applications should invoke Document.normalizeDocument() with the parameter namespaces set to true in order to ensure that the entity name is namespace well-formed. |
- Returns:
- The new
EntityReference object.
- Exceptions:
-
DOMException | INVALID_CHARACTER_ERR: Raised if the specified name is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute.
NOT_SUPPORTED_ERR: Raised if this document is an HTML document. |
Implemented in acdk::xml::dom::XMLDocument, and acdk::xml::libxmldom::LibXMLDocument. |
|
Creates a ProcessingInstruction node given the specified name and data strings.
- Parameters:
-
target | The target part of the processing instruction.Unlike Document.createElementNS or Document.createAttributeNS , no namespace well-formed checking is done on the target name. Applications should invoke Document.normalizeDocument() with the parameter namespaces set to true in order to ensure that the target name is namespace well-formed. |
data | The data for the node. |
- Returns:
- The new
ProcessingInstruction object.
- Exceptions:
-
DOMException | INVALID_CHARACTER_ERR: Raised if the specified target is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute.
NOT_SUPPORTED_ERR: Raised if this document is an HTML document. |
Implemented in acdk::xml::dom::XMLDocument, and acdk::xml::libxmldom::LibXMLDocument. |
virtual RText org::w3c::dom::Document::createTextNode |
( |
IN(RString) |
s |
) |
[pure virtual] |
|
virtual RDocumentType org::w3c::dom::Document::getDoctype |
( |
|
) |
[pure virtual] |
|
|
The Document Type Declaration (see DocumentType ) associated with this document.
For XML documents without a document type declaration this returns null . For HTML documents, a DocumentType object may be returned, independently of the presence or absence of document type declaration in the HTML document.
This provides direct access to the DocumentType node, child node of this Document . This node can be set at document creation time and later changed through the use of child nodes manipulation methods, such as Node::insertBefore , or Node::replaceChild . Note, however, that while some implementations may instantiate different types of Document objects supporting additional features than the Core, such as HTML [DOM Level 2 HTML] , based on the DocumentType specified at creation time, changing it afterwards is very unlikely to result in a change of the features supported. - Version:
- DOM Level 3
Implemented in acdk::xml::dom::XMLDocument, and acdk::xml::libxmldom::LibXMLDocument. |
virtual RElement org::w3c::dom::Document::getDocumentElement |
( |
|
) |
[pure virtual] |
|
virtual RNodeList org::w3c::dom::Document::getElementsByTagName |
( |
IN(RString) |
s |
) |
[pure virtual] |
|
|
Returns a NodeList of all the Elements in document order with a given tag name and are contained in the document.
- Parameters:
-
tagname | The name of the tag to match on. The special value * matches all tags. For XML, the tagname parameter is case-sensitive, otherwise it depends on the case-sensitivity of the markup language in use. |
- Returns:
- A new
NodeList object containing all the matched Elements .
Implemented in acdk::xml::dom::XMLDocument, and acdk::xml::libxmldom::LibXMLDocument. |
|