Home |All Classes |Grouped Classes |Index |Search

Class CL_DomDocument

DOM Document class. More...

Derived from:

public CL_DomNode

Derived by:

None

Group:

XML (Core)

#include <ClanLib/core.h>

Class Members:

Construction:

CL_DomDocument

Constructs a DOM Document.


Attributes:

get_doctype

Returns the Document Type Declaration (see CL_DomDocumentType )associated with this document.

get_implementation

Returns the CL_DomImplementation object that handles this document.

get_document_element

Returns the root document element node.


Operations:

create_element

Creates an element of the type specified.

create_element_ns

Creates an element of the given qualified name and namespace URI.

create_document_fragment

Creates an empty DocumentFragment object.

create_text_node

Creates a Text node given the specified string.

create_comment

Creates a Comment node given the specified string.

create_cdata_section

Creates a CDATASection node whose value is the specified string.

create_processing_instruction

Creates a ProcessingInstruction node given the specified name and data strings.

create_attribute

Creates an Attr of the given name.

create_attribute_ns

Creates an attribute of the given qualified name and namespace URI.

create_entity_reference

Creates an EntityReference object.

get_elements_by_tag_name

Returns a NodeList of all the Elements with a given tag name.

get_elements_by_tag_name_ns

Returns a NodeList of all the Elements with a given local name and namespace URI.

get_element_by_id

Returns the Element whose ID is given by element_id.

import_node

Imports a node from another document to this document.

load

Loads the DOM document as XML from an input source.

save

Saves the DOM document as XML to an input source.

clear_all

Removes all nodes from the DOM document.

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.