class Text

The <code> Text </code> interface represents the textual content (termed <a href="&xml-spec;#syntax"> character data </a> in XML) of an <code> Element </code> or <code> Attr </code> . More...

Full nameDOM::Text
Definition#include <dom_text.h>
InheritsDOM::CharacterData [public ]
Inherited byCDATASection
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods


Detailed Description

The <code> Text </code> interface represents the textual content (termed <a href="&xml-spec;#syntax"> character data </a> in XML) of an <code> Element </code> or <code> Attr </code> . If there is no markup inside an element's content, the text is contained in a single object implementing the <code> Text </code> interface that is the only child of the element. If there is markup, it is parsed into a list of elements and <code> Text </code> nodes that form the list of children of the element.

When a document is first made available via the DOM, there is only one <code> Text </code> node for each block of text. Users may create adjacent <code> Text </code> nodes that represent the contents of a given element without any intervening markup, but should be aware that there is no way to represent the separations between these nodes in XML or HTML, so they will not (in general) persist between DOM editing sessions. The <code> normalize() </code> method on <code> Element </code> merges any such adjacent <code> Text </code> objects into a single node for each block of text; this is recommended before employing operations that depend on a particular document structure, such as navigation with <code> XPointers. </code>

 Text ()

Text

 Text (const Text &other)

Text

 Text (const Node &other)

Text

Text &  operator = (const Node &other)

operator =

Reimplemented from CharacterData.

Text &  operator = (const Text &other)

operator =

Reimplemented from CharacterData.

 ~Text ()

~Text

Text  splitText ( const unsigned long offset )

splitText

Breaks this <code> Text </code> node into two Text nodes at the specified offset, keeping both in the tree as siblings. This node then only contains all the content up to the <code> offset </code> point. And a new <code> Text </code> node, which is inserted as the next sibling of this node, contains all the content at and after the <code> offset </code> point.

NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

Parameters:
offsetThe offset at which to split, starting from 0.

Returns: The new <code> Text </code> node.

Throws: DOMException, INDEX_SIZE_ERR:, Raised, if, the, specified, offset, is, negative, or, greater, than, the, number, of, characters, in, <code>, data, </code>, .

 Text (TextImpl *i)

Text

[protected]


Generated by: root@daffy.perf.redhat.com on Mon Jul 14 13:28:10 2003, using kdoc 2.0a53.