artefaktur
software engineer &        architecture

 
 
 
 

class Document

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:

org::w3c::dom::Branch acdk::xml::dom::XMLDocument acdk::xml::libxmldom::LibXMLDocument 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


Public Member Functions

virtual RDocumentType getDoctype ()=0
 The Document Type Declaration (see DocumentType) associated with this document.

virtual RDOMImplementation getImplementation ()=0
 The DOMImplementation object that handles this document.

virtual RElement getDocumentElement ()=0
 This is a convenience attribute that allows direct access to the child node that is the document element of the document.

virtual RElement createElement (IN(RString) s)=0 throw ( RDOMException )
 Creates an element of the type specified.

virtual RDocumentFragment createDocumentFragment ()=0
 Creates an empty DocumentFragment object.

virtual RText createTextNode (IN(RString) s)=0
 Creates a Text node given the specified string.

virtual RComment createComment (IN(RString) s)=0
 Creates a Comment node given the specified string.

virtual RCDATASection createCDATASection (IN(RString) s)=0 throw ( RDOMException )
 Creates a CDATASection node whose value is the specified string.

virtual RProcessingInstruction createProcessingInstruction (IN(RString) s, IN(RString) s1)=0 throw ( RDOMException )
 Creates a ProcessingInstruction node given the specified name and data strings.

virtual RAttr createAttribute (IN(RString) s)=0 throw ( RDOMException )
 Creates an Attr of the given name.

virtual REntityReference createEntityReference (IN(RString) s)=0 throw ( RDOMException )
 Creates an EntityReference object.

virtual RNodeList getElementsByTagName (IN(RString) s)=0
 Returns a NodeList of all the Elements in document order with a given tag name and are contained in the document.

virtual RDocument addComment (IN(RString) comment)

Member Function Documentation

virtual RDocument org::w3c::dom::Document::addComment IN(RString comment  )  [virtual]
 

virtual RAttr org::w3c::dom::Document::createAttribute IN(RString s  )  throw ( RDOMException ) [pure 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 RCDATASection org::w3c::dom::Document::createCDATASection IN(RString s  )  throw ( RDOMException ) [pure virtual]
 

Creates a CDATASection node whose value is the specified string.

Parameters:
data The data for the CDATASection contents.
Returns:
The new CDATASection object.
Exceptions:
DOMException NOT_SUPPORTED_ERR: Raised if this document is an HTML document.

Implemented in acdk::xml::dom::XMLDocument, and acdk::xml::libxmldom::LibXMLDocument.

virtual RComment org::w3c::dom::Document::createComment IN(RString s  )  [pure virtual]
 

Creates a Comment node given the specified string.

Parameters:
data The data for the node.
Returns:
The new Comment object.

Implemented in acdk::xml::dom::XMLDocument, and acdk::xml::libxmldom::LibXMLDocument.

virtual RDocumentFragment org::w3c::dom::Document::createDocumentFragment  )  [pure virtual]
 

Creates an empty DocumentFragment object.

Returns:
A new DocumentFragment.

Implemented in acdk::xml::dom::XMLDocument, and acdk::xml::libxmldom::LibXMLDocument.

virtual RElement org::w3c::dom::Document::createElement IN(RString s  )  throw ( RDOMException ) [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.

virtual REntityReference org::w3c::dom::Document::createEntityReference IN(RString s  )  throw ( RDOMException ) [pure virtual]
 

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.

virtual RProcessingInstruction org::w3c::dom::Document::createProcessingInstruction IN(RString s,
IN(RString s1
throw ( RDOMException ) [pure virtual]
 

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]
 

Creates a Text node given the specified string.

Parameters:
data The data for the node.
Returns:
The new Text object.

Implemented in acdk::xml::dom::XMLDocument, and acdk::xml::libxmldom::LibXMLDocument.

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]
 

This is a convenience attribute that allows direct access to the child node that is the document element of the document.

Implemented in acdk::xml::dom::XMLDocument, and acdk::xml::libxmldom::LibXMLDocument.

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.

virtual RDOMImplementation org::w3c::dom::Document::getImplementation  )  [pure virtual]
 

The DOMImplementation object that handles this document.

A DOM application may use objects from multiple implementations.

Implemented in acdk::xml::dom::XMLDocument, and acdk::xml::libxmldom::LibXMLDocument.

 
Last modified 2005-05-08 18:34 by SYSTEM By Artefaktur, Ing. Bureau Kommer