CopperSpice API  1.8.2
QDomCharacterData Class Reference

The QDomCharacterData class represents a generic string in the DOM. More...

Inheritance diagram for QDomCharacterData:
QDomNode QDomComment QDomText QDomCDATASection

Public Methods

 QDomCharacterData ()
 QDomCharacterData (const QDomCharacterData &other)
void appendData (const QString &arg)
QString data () const
void deleteData (unsigned long offset, unsigned long count)
void insertData (unsigned long offset, const QString &arg)
int length () const
QDomNode::NodeType nodeType () const
QDomCharacterData & operator= (const QDomCharacterData &other)
void replaceData (unsigned long offset, unsigned long count, const QString &arg)
void setData (const QString &data)
QString substringData (unsigned long offset, unsigned long count)
- Public Methods inherited from QDomNode
 QDomNode ()
 QDomNode (const QDomNode &other)
 ~QDomNode ()
QDomNode appendChild (const QDomNode &newChild)
QDomNamedNodeMap attributes () const
QDomNodeList childNodes () const
void clear ()
QDomNode cloneNode (bool deep=true) const
int columnNumber () const
QDomNode firstChild () const
QDomElement firstChildElement (const QString &tagName=QString ()) const
bool hasAttributes () const
bool hasChildNodes () const
QDomNode insertAfter (const QDomNode &newChild, const QDomNode &refChild)
QDomNode insertBefore (const QDomNode &newChild, const QDomNode &refChild)
bool isAttr () const
bool isCDATASection () const
bool isCharacterData () const
bool isComment () const
bool isDocument () const
bool isDocumentFragment () const
bool isDocumentType () const
bool isElement () const
bool isEntity () const
bool isEntityReference () const
bool isNotation () const
bool isNull () const
bool isProcessingInstruction () const
bool isSupported (const QString &feature, const QString &version) const
bool isText () const
QDomNode lastChild () const
QDomElement lastChildElement (const QString &tagName=QString ()) const
int lineNumber () const
QString localName () const
QDomNode namedItem (const QString &name) const
QString namespaceURI () const
QDomNode nextSibling () const
QDomElement nextSiblingElement (const QString &tagName=QString ()) const
QString nodeName () const
NodeType nodeType () const
QString nodeValue () const
void normalize ()
bool operator!= (const QDomNode &n) const
QDomNode & operator= (const QDomNode &other)
bool operator== (const QDomNode &n) const
QDomDocument ownerDocument () const
QDomNode parentNode () const
QString prefix () const
QDomNode previousSibling () const
QDomElement previousSiblingElement (const QString &tagName=QString ()) const
QDomNode removeChild (const QDomNode &oldChild)
QDomNode replaceChild (const QDomNode &newChild, const QDomNode &oldChild)
void save (QTextStream &stream, int indent, QDomNode::EncodingPolicy policy=QDomNode::EncodingFromDocument) const
void setNodeValue (const QString &value)
void setPrefix (const QString &prefix)
QDomAttr toAttr () const
QDomCDATASection toCDATASection () const
QDomCharacterData toCharacterData () const
QDomComment toComment () const
QDomDocument toDocument () const
QDomDocumentFragment toDocumentFragment () const
QDomDocumentType toDocumentType () const
QDomElement toElement () const
QDomEntity toEntity () const
QDomEntityReference toEntityReference () const
QDomNotation toNotation () const
QDomProcessingInstruction toProcessingInstruction () const
QDomText toText () const


class QDomComment
class QDomDocument
class QDomNode
class QDomText

Additional Inherited Members

- Public Types inherited from QDomNode
enum  EncodingPolicy
enum  NodeType

Detailed Description

The QDomCharacterData class represents a generic string in the DOM.

Character data as used in XML specifies a generic data string. More specialized versions of this class are QDomText, QDomComment and QDomCDATASection.

The data string is set with setData() and retrieved with data(). You can retrieve a portion of the data string using substringData(). Extra data can be appended with appendData(), or inserted with insertData(). Portions of the data string can be deleted with deleteData() or replaced with replaceData(). The length of the data string is returned by length().

The node type of the node containing this character data is returned by nodeType().

See also
QDomText, QDomComment, QDomCDATASection

Constructor & Destructor Documentation

QDomCharacterData::QDomCharacterData ( )

Constructs an empty character data object.

QDomCharacterData::QDomCharacterData ( const QDomCharacterData &  other)

Copy constructs a new QDomCharacterData from other.

Method Documentation

void QDomCharacterData::appendData ( const QString arg)

Appends the string arg to the stored string.

QString QDomCharacterData::data ( ) const

Returns the string stored in this object.

If the node is a null node, it will return an empty string.

See also
void QDomCharacterData::deleteData ( unsigned long  offset,
unsigned long  count 

Deletes a substring of length count from position offset.

void QDomCharacterData::insertData ( unsigned long  offset,
const QString arg 

Inserts the string arg into the stored string at position offset.

int QDomCharacterData::length ( ) const

Returns the length of the stored string.

QDomNode::NodeType QDomCharacterData::nodeType ( ) const

Returns the type of node this object refers to (i.e. TextNode, CDATASectionNode, CommentNode or CharacterDataNode). For a null node, returns CharacterDataNode.

QDomCharacterData & QDomCharacterData::operator= ( const QDomCharacterData &  other)

Copy assigns from other and returns a reference to this object.

void QDomCharacterData::replaceData ( unsigned long  offset,
unsigned long  count,
const QString arg 

Replaces the substring of length count starting at position offset with the string arg.

void QDomCharacterData::setData ( const QString data)

Sets this object's string to data.

See also
QString QDomCharacterData::substringData ( unsigned long  offset,
unsigned long  count 

Returns the substring of length count from position offset.