Home | All Classes | Grouped Classes | Index | Search

Class CL_DomDocument

DOM Document class. More...

Derived from: CL_DomNode
Derived by: none
Group: Core (XML)

#include <ClanLib/core.h>

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_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_entity_reference

Creates an EntityReference object.

get_elements_by_tag_name

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.

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:

!group=Core/XML! !header=core.h!

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.



Questions or comments, write to the
ClanLib mailing list.