You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qt3/doc/html/qdomcharacterdata.html

161 lines
9.2 KiB

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/xml/qdom.cpp:3415 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QDomCharacterData Class</title>
<style type="text/css"><!--
fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
<a href="index.html">
<font color="#004faf">Home</font></a>
| <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
| <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
| <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
| <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
| <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QDomCharacterData Class Reference<br><small>[<a href="xml.html">XML module</a>]</small></h1>
<p>The QDomCharacterData class represents a generic string in the DOM.
<a href="#details">More...</a>
<p>All the functions in this class are <a href="threads.html#reentrant">reentrant</a> when Qt is built with thread support.</p>
<p><tt>#include &lt;<a href="qdom-h.html">qdom.h</a>&gt;</tt>
<p>Inherits <a href="qdomnode.html">QDomNode</a>.
<p>Inherited by <a href="qdomtext.html">QDomText</a> and <a href="qdomcomment.html">QDomComment</a>.
<p><a href="qdomcharacterdata-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li class=fn><a href="#QDomCharacterData"><b>QDomCharacterData</b></a> ()</li>
<li class=fn><a href="#QDomCharacterData-2"><b>QDomCharacterData</b></a> ( const&nbsp;QDomCharacterData&nbsp;&amp;&nbsp;x )</li>
<li class=fn>QDomCharacterData &amp; <a href="#operator-eq"><b>operator=</b></a> ( const&nbsp;QDomCharacterData&nbsp;&amp;&nbsp;x )</li>
<li class=fn><a href="#~QDomCharacterData"><b>~QDomCharacterData</b></a> ()</li>
<li class=fn>virtual QString <a href="#substringData"><b>substringData</b></a> ( unsigned&nbsp;long&nbsp;offset, unsigned&nbsp;long&nbsp;count )</li>
<li class=fn>virtual void <a href="#appendData"><b>appendData</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;arg )</li>
<li class=fn>virtual void <a href="#insertData"><b>insertData</b></a> ( unsigned&nbsp;long&nbsp;offset, const&nbsp;QString&nbsp;&amp;&nbsp;arg )</li>
<li class=fn>virtual void <a href="#deleteData"><b>deleteData</b></a> ( unsigned&nbsp;long&nbsp;offset, unsigned&nbsp;long&nbsp;count )</li>
<li class=fn>virtual void <a href="#replaceData"><b>replaceData</b></a> ( unsigned&nbsp;long&nbsp;offset, unsigned&nbsp;long&nbsp;count, const&nbsp;QString&nbsp;&amp;&nbsp;arg )</li>
<li class=fn>virtual uint <a href="#length"><b>length</b></a> () const</li>
<li class=fn>virtual QString <a href="#data"><b>data</b></a> () const</li>
<li class=fn>virtual void <a href="#setData"><b>setData</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;v )</li>
<li class=fn>virtual QDomNode::NodeType <a href="#nodeType"><b>nodeType</b></a> () const</li>
<li class=fn>virtual bool <a href="#isCharacterData"><b>isCharacterData</b></a> () const</li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
The QDomCharacterData class represents a generic string in the DOM.
<p>
<p> Character data as used in XML specifies a generic data string.
More specialized versions of this class are <a href="qdomtext.html">QDomText</a>, <a href="qdomcomment.html">QDomComment</a>
and <a href="qdomcdatasection.html">QDomCDATASection</a>.
<p> The data string is set with <a href="#setData">setData</a>() and retrieved with <a href="#data">data</a>().
You can retrieve a portion of the data string using
<a href="#substringData">substringData</a>(). Extra data can be appended with <a href="#appendData">appendData</a>(), or
inserted with <a href="#insertData">insertData</a>(). Portions of the data string can be
deleted with <a href="#deleteData">deleteData</a>() or replaced with <a href="#replaceData">replaceData</a>(). The
length of the data string is returned by <a href="#length">length</a>().
<p> The node type of the node containing this character data is
returned by <a href="#nodeType">nodeType</a>().
<p> <p>See also <a href="qdomtext.html">QDomText</a>, <a href="qdomcomment.html">QDomComment</a>, <a href="qdomcdatasection.html">QDomCDATASection</a>, and <a href="xml-tools.html">XML</a>.
<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="QDomCharacterData"></a>QDomCharacterData::QDomCharacterData ()
</h3>
Constructs an empty character data object.
<h3 class=fn><a name="QDomCharacterData-2"></a>QDomCharacterData::QDomCharacterData ( const&nbsp;<a href="qdomcharacterdata.html">QDomCharacterData</a>&nbsp;&amp;&nbsp;x )
</h3>
Constructs a copy of <em>x</em>.
<p> The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a <a href="shclass.html#deep-copy">deep copy</a>, use
<a href="qdomnode.html#cloneNode">cloneNode</a>().
<h3 class=fn><a name="~QDomCharacterData"></a>QDomCharacterData::~QDomCharacterData ()
</h3>
Destroys the object and frees its resources.
<h3 class=fn>void <a name="appendData"></a>QDomCharacterData::appendData ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;arg )<tt> [virtual]</tt>
</h3>
Appends the string <em>arg</em> to the stored string.
<h3 class=fn><a href="qstring.html">QString</a> <a name="data"></a>QDomCharacterData::data () const<tt> [virtual]</tt>
</h3>
Returns the string stored in this object.
<p> If the node is a <a href="qdomnode.html#isNull">null node</a>, it will return
<a href="qstring.html#QString-null">QString::null</a>.
<h3 class=fn>void <a name="deleteData"></a>QDomCharacterData::deleteData ( unsigned&nbsp;long&nbsp;offset, unsigned&nbsp;long&nbsp;count )<tt> [virtual]</tt>
</h3>
Deletes a substring of length <em>count</em> from position <em>offset</em>.
<h3 class=fn>void <a name="insertData"></a>QDomCharacterData::insertData ( unsigned&nbsp;long&nbsp;offset, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;arg )<tt> [virtual]</tt>
</h3>
Inserts the string <em>arg</em> into the stored string at position <em>offset</em>.
<h3 class=fn>bool <a name="isCharacterData"></a>QDomCharacterData::isCharacterData () const<tt> [virtual]</tt>
</h3>
Returns TRUE.
<p>Reimplemented from <a href="qdomnode.html#isCharacterData">QDomNode</a>.
<h3 class=fn>uint <a name="length"></a>QDomCharacterData::length () const<tt> [virtual]</tt>
</h3>
Returns the length of the stored string.
<h3 class=fn><a href="qdomnode.html#NodeType-enum">QDomNode::NodeType</a> <a name="nodeType"></a>QDomCharacterData::nodeType () const<tt> [virtual]</tt>
</h3>
Returns the type of node this object refers to (i.e. <a href="qdomnode.html#NodeType-enum">TextNode</a>,
<a href="qdomnode.html#NodeType-enum">CDATASectionNode</a>, <a href="qdomnode.html#NodeType-enum">CommentNode</a> or <a href="qdomnode.html#NodeType-enum">CharacterDataNode</a>). For
a <a href="qdomnode.html#isNull">null node</a> <a href="qdomnode.html#NodeType-enum">CharacterDataNode</a> is
returned.
<p>Reimplemented from <a href="qdomnode.html#nodeType">QDomNode</a>.
<p>Reimplemented in <a href="qdomtext.html#nodeType">QDomText</a> and <a href="qdomcomment.html#nodeType">QDomComment</a>.
<h3 class=fn><a href="qdomcharacterdata.html">QDomCharacterData</a>&nbsp;&amp; <a name="operator-eq"></a>QDomCharacterData::operator= ( const&nbsp;<a href="qdomcharacterdata.html">QDomCharacterData</a>&nbsp;&amp;&nbsp;x )
</h3>
Assigns <em>x</em> to this character data.
<p> The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a <a href="shclass.html#deep-copy">deep copy</a>, use
<a href="qdomnode.html#cloneNode">cloneNode</a>().
<h3 class=fn>void <a name="replaceData"></a>QDomCharacterData::replaceData ( unsigned&nbsp;long&nbsp;offset, unsigned&nbsp;long&nbsp;count, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;arg )<tt> [virtual]</tt>
</h3>
Replaces the substring of length <em>count</em> starting at position <em>offset</em> with the string <em>arg</em>.
<h3 class=fn>void <a name="setData"></a>QDomCharacterData::setData ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;v )<tt> [virtual]</tt>
</h3>
Sets this object's string to <em>v</em>.
<h3 class=fn><a href="qstring.html">QString</a> <a name="substringData"></a>QDomCharacterData::substringData ( unsigned&nbsp;long&nbsp;offset, unsigned&nbsp;long&nbsp;count )<tt> [virtual]</tt>
</h3>
Returns the substring of length <em>count</em> from position <em>offset</em>.
<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>.
Copyright &copy; 1995-2007
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2007
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt 3.3.8</div>
</table></div></address></body>
</html>