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.
tqt3/doc/html/tqdomnode.html

742 lines
48 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/tqdom.cpp:1528 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>TQDomNode 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>TQDomNode Class Reference<br><small>[<a href="xml.html">XML module</a>]</small></h1>
<p>The TQDomNode class is the base class for all the nodes in a DOM tree.
<a href="#details">More...</a>
<p>All the functions in this class are <a href="threads.html#reentrant">reentrant</a> when TQt is built with thread support.</p>
<p><tt>#include &lt;<a href="tqdom-h.html">tqdom.h</a>&gt;</tt>
<p>Inherited by <a href="tqdomdocumenttype.html">TQDomDocumentType</a>, <a href="tqdomdocument.html">TQDomDocument</a>, <a href="tqdomdocumentfragment.html">TQDomDocumentFragment</a>, <a href="tqdomcharacterdata.html">TQDomCharacterData</a>, <a href="tqdomattr.html">TQDomAttr</a>, <a href="tqdomelement.html">TQDomElement</a>, <a href="tqdomnotation.html">TQDomNotation</a>, <a href="tqdomentity.html">TQDomEntity</a>, <a href="tqdomentityreference.html">TQDomEntityReference</a>, and <a href="tqdomprocessinginstruction.html">TQDomProcessingInstruction</a>.
<p><a href="tqdomnode-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li class=fn>enum <a href="#NodeType-enum"><b>NodeType</b></a> { ElementNode = 1, AttributeNode = 2, TextNode = 3, CDATASectionNode = 4, EntityReferenceNode = 5, EntityNode = 6, ProcessingInstructionNode = 7, CommentNode = 8, DocumentNode = 9, DocumentTypeNode = 10, DocumentFragmentNode = 11, NotationNode = 12, BaseNode = 21, CharacterDataNode = 22 }</li>
<li class=fn><a href="#TQDomNode"><b>TQDomNode</b></a> ()</li>
<li class=fn><a href="#TQDomNode-2"><b>TQDomNode</b></a> ( const&nbsp;TQDomNode&nbsp;&amp;&nbsp;n )</li>
<li class=fn>TQDomNode &amp; <a href="#operator-eq"><b>operator=</b></a> ( const&nbsp;TQDomNode&nbsp;&amp;&nbsp;n )</li>
<li class=fn>bool <a href="#operator-eq-eq"><b>operator==</b></a> ( const&nbsp;TQDomNode&nbsp;&amp;&nbsp;n ) const</li>
<li class=fn>bool <a href="#operator!-eq"><b>operator!=</b></a> ( const&nbsp;TQDomNode&nbsp;&amp;&nbsp;n ) const</li>
<li class=fn>virtual <a href="#~TQDomNode"><b>~TQDomNode</b></a> ()</li>
<li class=fn>virtual TQDomNode <a href="#insertBefore"><b>insertBefore</b></a> ( const&nbsp;TQDomNode&nbsp;&amp;&nbsp;newChild, const&nbsp;TQDomNode&nbsp;&amp;&nbsp;refChild )</li>
<li class=fn>virtual TQDomNode <a href="#insertAfter"><b>insertAfter</b></a> ( const&nbsp;TQDomNode&nbsp;&amp;&nbsp;newChild, const&nbsp;TQDomNode&nbsp;&amp;&nbsp;refChild )</li>
<li class=fn>virtual TQDomNode <a href="#replaceChild"><b>replaceChild</b></a> ( const&nbsp;TQDomNode&nbsp;&amp;&nbsp;newChild, const&nbsp;TQDomNode&nbsp;&amp;&nbsp;oldChild )</li>
<li class=fn>virtual TQDomNode <a href="#removeChild"><b>removeChild</b></a> ( const&nbsp;TQDomNode&nbsp;&amp;&nbsp;oldChild )</li>
<li class=fn>virtual TQDomNode <a href="#appendChild"><b>appendChild</b></a> ( const&nbsp;TQDomNode&nbsp;&amp;&nbsp;newChild )</li>
<li class=fn>virtual bool <a href="#hasChildNodes"><b>hasChildNodes</b></a> () const</li>
<li class=fn>virtual TQDomNode <a href="#cloneNode"><b>cloneNode</b></a> ( bool&nbsp;deep = TRUE ) const</li>
<li class=fn>virtual void <a href="#normalize"><b>normalize</b></a> ()</li>
<li class=fn>virtual bool <a href="#isSupported"><b>isSupported</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;feature, const&nbsp;TQString&nbsp;&amp;&nbsp;version ) const</li>
<li class=fn>virtual TQString <a href="#nodeName"><b>nodeName</b></a> () const</li>
<li class=fn>virtual TQDomNode::NodeType <a href="#nodeType"><b>nodeType</b></a> () const</li>
<li class=fn>virtual TQDomNode <a href="#parentNode"><b>parentNode</b></a> () const</li>
<li class=fn>virtual TQDomNodeList <a href="#childNodes"><b>childNodes</b></a> () const</li>
<li class=fn>virtual TQDomNode <a href="#firstChild"><b>firstChild</b></a> () const</li>
<li class=fn>virtual TQDomNode <a href="#lastChild"><b>lastChild</b></a> () const</li>
<li class=fn>virtual TQDomNode <a href="#previousSibling"><b>previousSibling</b></a> () const</li>
<li class=fn>virtual TQDomNode <a href="#nextSibling"><b>nextSibling</b></a> () const</li>
<li class=fn>virtual TQDomNamedNodeMap <a href="#attributes"><b>attributes</b></a> () const</li>
<li class=fn>virtual TQDomDocument <a href="#ownerDocument"><b>ownerDocument</b></a> () const</li>
<li class=fn>virtual TQString <a href="#namespaceURI"><b>namespaceURI</b></a> () const</li>
<li class=fn>virtual TQString <a href="#localName"><b>localName</b></a> () const</li>
<li class=fn>virtual bool <a href="#hasAttributes"><b>hasAttributes</b></a> () const</li>
<li class=fn>virtual TQString <a href="#nodeValue"><b>nodeValue</b></a> () const</li>
<li class=fn>virtual void <a href="#setNodeValue"><b>setNodeValue</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;v )</li>
<li class=fn>virtual TQString <a href="#prefix"><b>prefix</b></a> () const</li>
<li class=fn>virtual void <a href="#setPrefix"><b>setPrefix</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;pre )</li>
<li class=fn>virtual bool <a href="#isAttr"><b>isAttr</b></a> () const</li>
<li class=fn>virtual bool <a href="#isCDATASection"><b>isCDATASection</b></a> () const</li>
<li class=fn>virtual bool <a href="#isDocumentFragment"><b>isDocumentFragment</b></a> () const</li>
<li class=fn>virtual bool <a href="#isDocument"><b>isDocument</b></a> () const</li>
<li class=fn>virtual bool <a href="#isDocumentType"><b>isDocumentType</b></a> () const</li>
<li class=fn>virtual bool <a href="#isElement"><b>isElement</b></a> () const</li>
<li class=fn>virtual bool <a href="#isEntityReference"><b>isEntityReference</b></a> () const</li>
<li class=fn>virtual bool <a href="#isText"><b>isText</b></a> () const</li>
<li class=fn>virtual bool <a href="#isEntity"><b>isEntity</b></a> () const</li>
<li class=fn>virtual bool <a href="#isNotation"><b>isNotation</b></a> () const</li>
<li class=fn>virtual bool <a href="#isProcessingInstruction"><b>isProcessingInstruction</b></a> () const</li>
<li class=fn>virtual bool <a href="#isCharacterData"><b>isCharacterData</b></a> () const</li>
<li class=fn>virtual bool <a href="#isComment"><b>isComment</b></a> () const</li>
<li class=fn>TQDomNode <a href="#namedItem"><b>namedItem</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;name ) const</li>
<li class=fn>bool <a href="#isNull"><b>isNull</b></a> () const</li>
<li class=fn>void <a href="#clear"><b>clear</b></a> ()</li>
<li class=fn>TQDomAttr <a href="#toAttr"><b>toAttr</b></a> ()</li>
<li class=fn>TQDomCDATASection <a href="#toCDATASection"><b>toCDATASection</b></a> ()</li>
<li class=fn>TQDomDocumentFragment <a href="#toDocumentFragment"><b>toDocumentFragment</b></a> ()</li>
<li class=fn>TQDomDocument <a href="#toDocument"><b>toDocument</b></a> ()</li>
<li class=fn>TQDomDocumentType <a href="#toDocumentType"><b>toDocumentType</b></a> ()</li>
<li class=fn>TQDomElement <a href="#toElement"><b>toElement</b></a> ()</li>
<li class=fn>TQDomEntityReference <a href="#toEntityReference"><b>toEntityReference</b></a> ()</li>
<li class=fn>TQDomText <a href="#toText"><b>toText</b></a> ()</li>
<li class=fn>TQDomEntity <a href="#toEntity"><b>toEntity</b></a> ()</li>
<li class=fn>TQDomNotation <a href="#toNotation"><b>toNotation</b></a> ()</li>
<li class=fn>TQDomProcessingInstruction <a href="#toProcessingInstruction"><b>toProcessingInstruction</b></a> ()</li>
<li class=fn>TQDomCharacterData <a href="#toCharacterData"><b>toCharacterData</b></a> ()</li>
<li class=fn>TQDomComment <a href="#toComment"><b>toComment</b></a> ()</li>
<li class=fn>void <a href="#save"><b>save</b></a> ( TQTextStream&nbsp;&amp;&nbsp;str, int&nbsp;indent ) const</li>
</ul>
<h2>Related Functions</h2>
<ul>
<li class=fn>TQTextStream &amp; <a href="#operator-lt-lt"><b>operator&lt;&lt;</b></a> ( TQTextStream&nbsp;&amp;&nbsp;str, const&nbsp;TQDomNode&nbsp;&amp;&nbsp;node )</li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
The TQDomNode class is the base class for all the nodes in a DOM tree.
<p>
<p> Many functions in the DOM return a TQDomNode.
<p> You can find out the type of a node using <a href="#isAttr">isAttr</a>(),
<a href="#isCDATASection">isCDATASection</a>(), <a href="#isDocumentFragment">isDocumentFragment</a>(), <a href="#isDocument">isDocument</a>(),
<a href="#isDocumentType">isDocumentType</a>(), <a href="#isElement">isElement</a>(), <a href="#isEntityReference">isEntityReference</a>(), <a href="#isText">isText</a>(),
<a href="#isEntity">isEntity</a>(), <a href="#isNotation">isNotation</a>(), <a href="#isProcessingInstruction">isProcessingInstruction</a>(),
<a href="#isCharacterData">isCharacterData</a>() and <a href="#isComment">isComment</a>().
<p> A TQDomNode can be converted into one of its subclasses using
<a href="#toAttr">toAttr</a>(), <a href="#toCDATASection">toCDATASection</a>(), <a href="#toDocumentFragment">toDocumentFragment</a>(), <a href="#toDocument">toDocument</a>(),
<a href="#toDocumentType">toDocumentType</a>(), <a href="#toElement">toElement</a>(), <a href="#toEntityReference">toEntityReference</a>(), <a href="#toText">toText</a>(),
<a href="#toEntity">toEntity</a>(), <a href="#toNotation">toNotation</a>(), <a href="#toProcessingInstruction">toProcessingInstruction</a>(),
<a href="#toCharacterData">toCharacterData</a>() or <a href="#toComment">toComment</a>(). You can convert a node to a null
node with <a href="#clear">clear</a>().
<p> Copies of the TQDomNode class share their data using <a href="shclass.html#explicit-sharing">explicit sharing</a>. This means that modifying one node will change all
copies. This is especially useful in combination with functions
which return a TQDomNode, e.g. <a href="#firstChild">firstChild</a>(). You can make an
independent (deep) copy of the node with <a href="#cloneNode">cloneNode</a>().
<p> Nodes are inserted with <a href="#insertBefore">insertBefore</a>(), <a href="#insertAfter">insertAfter</a>() or
<a href="#appendChild">appendChild</a>(). You can replace one node with another using
<a href="#replaceChild">replaceChild</a>() and remove a node with <a href="#removeChild">removeChild</a>().
<p> To traverse nodes use firstChild() to get a node's first child (if
any), and <a href="#nextSibling">nextSibling</a>() to traverse. TQDomNode also provides
<a href="#lastChild">lastChild</a>(), <a href="#previousSibling">previousSibling</a>() and <a href="#parentNode">parentNode</a>(). To find the first
child node with a particular node name use <a href="#namedItem">namedItem</a>().
<p> To find out if a node has children use <a href="#hasChildNodes">hasChildNodes</a>() and to get
a list of all of a node's children use <a href="#childNodes">childNodes</a>().
<p> The node's name and value (the meaning of which varies depending
on its type) is returned by <a href="#nodeName">nodeName</a>() and <a href="#nodeValue">nodeValue</a>()
respectively. The node's type is returned by <a href="#nodeType">nodeType</a>(). The
node's value can be set with <a href="#setNodeValue">setNodeValue</a>().
<p> The document to which the node belongs is returned by
<a href="#ownerDocument">ownerDocument</a>().
<p> Adjacent <a href="tqdomtext.html">TQDomText</a> nodes can be merged into a single node with
<a href="#normalize">normalize</a>().
<p> <a href="tqdomelement.html">TQDomElement</a> nodes have attributes which can be retrieved with
<a href="#attributes">attributes</a>().
<p> <a href="tqdomelement.html">TQDomElement</a> and <a href="tqdomattr.html">TQDomAttr</a> nodes can have namespaces which can be
retrieved with <a href="#namespaceURI">namespaceURI</a>(). Their local name is retrieved with
<a href="#localName">localName</a>(), and their prefix with <a href="#prefix">prefix</a>(). The prefix can be set
with <a href="#setPrefix">setPrefix</a>().
<p> You can write the XML representation of the node to a text stream
with <a href="#save">save</a>().
<p> The following example looks for the first element in an XML document and
prints the names of all the elements that are its direct children.
<pre>
<a href="tqdomdocument.html">TQDomDocument</a> d;
d.<a href="tqdomdocument.html#setContent">setContent</a>( someXML );
TQDomNode n = d.<a href="#firstChild">firstChild</a>();
while ( !n.<a href="#isNull">isNull</a>() ) {
if ( n.<a href="#isElement">isElement</a>() ) {
<a href="tqdomelement.html">TQDomElement</a> e = n.<a href="#toElement">toElement</a>();
cout &lt;&lt; "Element name: " &lt;&lt; e.<a href="tqdomelement.html#tagName">tagName</a>() &lt;&lt; endl;
break;
}
n = n.<a href="#nextSibling">nextSibling</a>();
}
</pre>
<p> For further information about the Document Object Model see <a href="http://www.w3.org/TR/REC-DOM-Level-1/">http://www.w3.org/TR/REC-DOM-Level-1/</a> and <a href="http://www.w3.org/TR/DOM-Level-2-Core/">http://www.w3.org/TR/DOM-Level-2-Core/</a>. For a more general
introduction of the DOM implementation see the <a href="tqdomdocument.html">TQDomDocument</a>
documentation.
<p>See also <a href="xml-tools.html">XML</a>.
<hr><h2>Member Type Documentation</h2>
<h3 class=fn><a name="NodeType-enum"></a>TQDomNode::NodeType</h3>
<p> This enum defines the type of the node:
<ul>
<li><tt>TQDomNode::ElementNode</tt>
<li><tt>TQDomNode::AttributeNode</tt>
<li><tt>TQDomNode::TextNode</tt>
<li><tt>TQDomNode::CDATASectionNode</tt>
<li><tt>TQDomNode::EntityReferenceNode</tt>
<li><tt>TQDomNode::EntityNode</tt>
<li><tt>TQDomNode::ProcessingInstructionNode</tt>
<li><tt>TQDomNode::CommentNode</tt>
<li><tt>TQDomNode::DocumentNode</tt>
<li><tt>TQDomNode::DocumentTypeNode</tt>
<li><tt>TQDomNode::DocumentFragmentNode</tt>
<li><tt>TQDomNode::NotationNode</tt>
<li><tt>TQDomNode::BaseNode</tt> - A TQDomNode object, i.e. not a TQDomNode subclass.
<li><tt>TQDomNode::CharacterDataNode</tt>
</ul>
<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="TQDomNode"></a>TQDomNode::TQDomNode ()
</h3>
Constructs a <a href="#isNull">null</a> node.
<h3 class=fn><a name="TQDomNode-2"></a>TQDomNode::TQDomNode ( const&nbsp;<a href="tqdomnode.html">TQDomNode</a>&nbsp;&amp;&nbsp;n )
</h3>
Constructs a copy of <em>n</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="#cloneNode">cloneNode</a>().
<h3 class=fn><a name="~TQDomNode"></a>TQDomNode::~TQDomNode ()<tt> [virtual]</tt>
</h3>
Destroys the object and frees its resources.
<h3 class=fn><a href="tqdomnode.html">TQDomNode</a> <a name="appendChild"></a>TQDomNode::appendChild ( const&nbsp;<a href="tqdomnode.html">TQDomNode</a>&nbsp;&amp;&nbsp;newChild )<tt> [virtual]</tt>
</h3>
Appends <em>newChild</em> as the node's last child.
<p> If <em>newChild</em> is the child of another node, it is reparented to
this node. If <em>newChild</em> is a child of this node, then its
position in the list of children is changed.
<p> If <em>newChild</em> is a <a href="tqdomdocumentfragment.html">TQDomDocumentFragment</a>, then the children of the
fragment are removed from the fragment and appended.
<p> Returns a new reference to <em>newChild</em>.
<p> <p>See also <a href="#insertBefore">insertBefore</a>(), <a href="#insertAfter">insertAfter</a>(), <a href="#replaceChild">replaceChild</a>(), and <a href="#removeChild">removeChild</a>().
<h3 class=fn><a href="tqdomnamednodemap.html">TQDomNamedNodeMap</a> <a name="attributes"></a>TQDomNode::attributes () const<tt> [virtual]</tt>
</h3>
Returns a named node map of all attributes. Attributes are only
provided for <a href="tqdomelement.html">TQDomElement</a>s.
<p> Changing the attributes in the map will also change the attributes
of this TQDomNode.
<p>Reimplemented in <a href="tqdomelement.html#attributes">TQDomElement</a>.
<h3 class=fn><a href="tqdomnodelist.html">TQDomNodeList</a> <a name="childNodes"></a>TQDomNode::childNodes () const<tt> [virtual]</tt>
</h3>
Returns a list of all direct child nodes.
<p> Most often you will call this function on a <a href="tqdomelement.html">TQDomElement</a> object.
<p> For example, if the XML document looks like this:
<pre>
&lt;body&gt;
&lt;h1&gt;Heading&lt;/h1&gt;
&lt;p&gt;Hello &lt;b&gt;you&lt;/b&gt;&lt;/p&gt;
&lt;/body&gt;
</pre>
Then the list of child nodes for the "body"-element will contain
the node created by the &lt;h1&gt; tag and the node created by the
&lt;p&gt; tag.
<p> The nodes in the list are not copied; so changing the nodes in the
list will also change the children of this node.
<p> <p>See also <a href="#firstChild">firstChild</a>() and <a href="#lastChild">lastChild</a>().
<h3 class=fn>void <a name="clear"></a>TQDomNode::clear ()
</h3>
Converts the node into a null node; if it was not a null node
before, its type and contents are deleted.
<p> <p>See also <a href="#isNull">isNull</a>().
<h3 class=fn><a href="tqdomnode.html">TQDomNode</a> <a name="cloneNode"></a>TQDomNode::cloneNode ( bool&nbsp;deep = TRUE ) const<tt> [virtual]</tt>
</h3>
Creates a deep (not shallow) copy of the TQDomNode.
<p> If <em>deep</em> is TRUE, then the cloning is done recursively which
means that all the node's children are deep copied too. If <em>deep</em>
is FALSE only the node itself is copied and the copy will have no
child nodes.
<h3 class=fn><a href="tqdomnode.html">TQDomNode</a> <a name="firstChild"></a>TQDomNode::firstChild () const<tt> [virtual]</tt>
</h3>
Returns the first child of the node. If there is no child node, a
<a href="#isNull">null node</a> is returned. Changing the
returned node will also change the node in the document tree.
<p> <p>See also <a href="#lastChild">lastChild</a>() and <a href="#childNodes">childNodes</a>().
<p>Example: <a href="outliner-example.html#x1907">xml/outliner/outlinetree.cpp</a>.
<h3 class=fn>bool <a name="hasAttributes"></a>TQDomNode::hasAttributes () const<tt> [virtual]</tt>
</h3>
Returns TRUE if the node has attributes; otherwise returns FALSE.
<p> <p>See also <a href="#attributes">attributes</a>().
<h3 class=fn>bool <a name="hasChildNodes"></a>TQDomNode::hasChildNodes () const<tt> [virtual]</tt>
</h3>
Returns TRUE if the node has one or more children; otherwise
returns FALSE.
<h3 class=fn><a href="tqdomnode.html">TQDomNode</a> <a name="insertAfter"></a>TQDomNode::insertAfter ( const&nbsp;<a href="tqdomnode.html">TQDomNode</a>&nbsp;&amp;&nbsp;newChild, const&nbsp;<a href="tqdomnode.html">TQDomNode</a>&nbsp;&amp;&nbsp;refChild )<tt> [virtual]</tt>
</h3>
Inserts the node <em>newChild</em> after the child node <em>refChild</em>. <em>refChild</em> must be a direct child of this node. If <em>refChild</em> is
<a href="#isNull">null</a> then <em>newChild</em> is appended as this
node's last child.
<p> If <em>newChild</em> is the child of another node, it is reparented to
this node. If <em>newChild</em> is a child of this node, then its
position in the list of children is changed.
<p> If <em>newChild</em> is a <a href="tqdomdocumentfragment.html">TQDomDocumentFragment</a>, then the children of the
fragment are removed from the fragment and inserted after <em>refChild</em>.
<p> Returns a new reference to <em>newChild</em> on success or a <a href="#isNull">null node</a> on failure.
<p> <p>See also <a href="#insertBefore">insertBefore</a>(), <a href="#replaceChild">replaceChild</a>(), <a href="#removeChild">removeChild</a>(), and <a href="#appendChild">appendChild</a>().
<h3 class=fn><a href="tqdomnode.html">TQDomNode</a> <a name="insertBefore"></a>TQDomNode::insertBefore ( const&nbsp;<a href="tqdomnode.html">TQDomNode</a>&nbsp;&amp;&nbsp;newChild, const&nbsp;<a href="tqdomnode.html">TQDomNode</a>&nbsp;&amp;&nbsp;refChild )<tt> [virtual]</tt>
</h3>
Inserts the node <em>newChild</em> before the child node <em>refChild</em>.
<em>refChild</em> must be a direct child of this node. If <em>refChild</em> is
<a href="#isNull">null</a> then <em>newChild</em> is inserted as the
node's first child.
<p> If <em>newChild</em> is the child of another node, it is reparented to
this node. If <em>newChild</em> is a child of this node, then its
position in the list of children is changed.
<p> If <em>newChild</em> is a <a href="tqdomdocumentfragment.html">TQDomDocumentFragment</a>, then the children of the
fragment are removed from the fragment and inserted before <em>refChild</em>.
<p> Returns a new reference to <em>newChild</em> on success or a <a href="#isNull">null node</a> on failure.
<p> <p>See also <a href="#insertAfter">insertAfter</a>(), <a href="#replaceChild">replaceChild</a>(), <a href="#removeChild">removeChild</a>(), and <a href="#appendChild">appendChild</a>().
<h3 class=fn>bool <a name="isAttr"></a>TQDomNode::isAttr () const<tt> [virtual]</tt>
</h3>
Returns TRUE if the node is an attribute; otherwise returns FALSE.
<p> If this function returns TRUE, it does not imply that this object
is a TQDomAttribute; you can get the TQDomAttribute with
toAttribute().
<p> <p>See also <a href="#toAttr">toAttr</a>().
<p>Reimplemented in <a href="tqdomattr.html#isAttr">TQDomAttr</a>.
<h3 class=fn>bool <a name="isCDATASection"></a>TQDomNode::isCDATASection () const<tt> [virtual]</tt>
</h3>
Returns TRUE if the node is a CDATA section; otherwise returns
FALSE.
<p> If this function returns TRUE, it does not imply that this object
is a <a href="tqdomcdatasection.html">TQDomCDATASection</a>; you can get the TQDomCDATASection with
<a href="#toCDATASection">toCDATASection</a>().
<p> <p>See also <a href="#toCDATASection">toCDATASection</a>().
<p>Reimplemented in <a href="tqdomcdatasection.html#isCDATASection">TQDomCDATASection</a>.
<h3 class=fn>bool <a name="isCharacterData"></a>TQDomNode::isCharacterData () const<tt> [virtual]</tt>
</h3>
Returns TRUE if the node is a character data node; otherwise
returns FALSE.
<p> If this function returns TRUE, it does not imply that this object
is a <a href="tqdomcharacterdata.html">TQDomCharacterData</a>; you can get the TQDomCharacterData with
<a href="#toCharacterData">toCharacterData</a>().
<p> <p>See also <a href="#toCharacterData">toCharacterData</a>().
<p>Reimplemented in <a href="tqdomcharacterdata.html#isCharacterData">TQDomCharacterData</a>.
<h3 class=fn>bool <a name="isComment"></a>TQDomNode::isComment () const<tt> [virtual]</tt>
</h3>
Returns TRUE if the node is a comment; otherwise returns FALSE.
<p> If this function returns TRUE, it does not imply that this object
is a <a href="tqdomcomment.html">TQDomComment</a>; you can get the TQDomComment with <a href="#toComment">toComment</a>().
<p> <p>See also <a href="#toComment">toComment</a>().
<p>Reimplemented in <a href="tqdomcomment.html#isComment">TQDomComment</a>.
<h3 class=fn>bool <a name="isDocument"></a>TQDomNode::isDocument () const<tt> [virtual]</tt>
</h3>
Returns TRUE if the node is a document; otherwise returns FALSE.
<p> If this function returns TRUE, it does not imply that this object
is a <a href="tqdomdocument.html">TQDomDocument</a>; you can get the TQDomDocument with <a href="#toDocument">toDocument</a>().
<p> <p>See also <a href="#toDocument">toDocument</a>().
<p>Reimplemented in <a href="tqdomdocument.html#isDocument">TQDomDocument</a>.
<h3 class=fn>bool <a name="isDocumentFragment"></a>TQDomNode::isDocumentFragment () const<tt> [virtual]</tt>
</h3>
Returns TRUE if the node is a document fragment; otherwise returns
FALSE.
<p> If this function returns TRUE, it does not imply that this object
is a <a href="tqdomdocumentfragment.html">TQDomDocumentFragment</a>; you can get the TQDomDocumentFragment
with <a href="#toDocumentFragment">toDocumentFragment</a>().
<p> <p>See also <a href="#toDocumentFragment">toDocumentFragment</a>().
<p>Reimplemented in <a href="tqdomdocumentfragment.html#isDocumentFragment">TQDomDocumentFragment</a>.
<h3 class=fn>bool <a name="isDocumentType"></a>TQDomNode::isDocumentType () const<tt> [virtual]</tt>
</h3>
Returns TRUE if the node is a document type; otherwise returns
FALSE.
<p> If this function returns TRUE, it does not imply that this object
is a <a href="tqdomdocumenttype.html">TQDomDocumentType</a>; you can get the TQDomDocumentType with
<a href="#toDocumentType">toDocumentType</a>().
<p> <p>See also <a href="#toDocumentType">toDocumentType</a>().
<p>Reimplemented in <a href="tqdomdocumenttype.html#isDocumentType">TQDomDocumentType</a>.
<h3 class=fn>bool <a name="isElement"></a>TQDomNode::isElement () const<tt> [virtual]</tt>
</h3>
Returns TRUE if the node is an element; otherwise returns FALSE.
<p> If this function returns TRUE, it does not imply that this object
is a <a href="tqdomelement.html">TQDomElement</a>; you can get the TQDomElement with <a href="#toElement">toElement</a>().
<p> <p>See also <a href="#toElement">toElement</a>().
<p>Example: <a href="outliner-example.html#x1908">xml/outliner/outlinetree.cpp</a>.
<p>Reimplemented in <a href="tqdomelement.html#isElement">TQDomElement</a>.
<h3 class=fn>bool <a name="isEntity"></a>TQDomNode::isEntity () const<tt> [virtual]</tt>
</h3>
Returns TRUE if the node is an entity; otherwise returns FALSE.
<p> If this function returns TRUE, it does not imply that this object
is a <a href="tqdomentity.html">TQDomEntity</a>; you can get the TQDomEntity with <a href="#toEntity">toEntity</a>().
<p> <p>See also <a href="#toEntity">toEntity</a>().
<p>Reimplemented in <a href="tqdomentity.html#isEntity">TQDomEntity</a>.
<h3 class=fn>bool <a name="isEntityReference"></a>TQDomNode::isEntityReference () const<tt> [virtual]</tt>
</h3>
Returns TRUE if the node is an entity reference; otherwise returns
FALSE.
<p> If this function returns TRUE, it does not imply that this object
is a <a href="tqdomentityreference.html">TQDomEntityReference</a>; you can get the TQDomEntityReference with
<a href="#toEntityReference">toEntityReference</a>().
<p> <p>See also <a href="#toEntityReference">toEntityReference</a>().
<p>Reimplemented in <a href="tqdomentityreference.html#isEntityReference">TQDomEntityReference</a>.
<h3 class=fn>bool <a name="isNotation"></a>TQDomNode::isNotation () const<tt> [virtual]</tt>
</h3>
Returns TRUE if the node is a notation; otherwise returns FALSE.
<p> If this function returns TRUE, it does not imply that this object
is a <a href="tqdomnotation.html">TQDomNotation</a>; you can get the TQDomNotation with <a href="#toNotation">toNotation</a>().
<p> <p>See also <a href="#toNotation">toNotation</a>().
<p>Reimplemented in <a href="tqdomnotation.html#isNotation">TQDomNotation</a>.
<h3 class=fn>bool <a name="isNull"></a>TQDomNode::isNull () const
</h3>
Returns TRUE if this node is null (i.e. if it has no type or
contents); otherwise returns FALSE.
<p>Example: <a href="outliner-example.html#x1909">xml/outliner/outlinetree.cpp</a>.
<h3 class=fn>bool <a name="isProcessingInstruction"></a>TQDomNode::isProcessingInstruction () const<tt> [virtual]</tt>
</h3>
Returns TRUE if the node is a processing instruction; otherwise
returns FALSE.
<p> If this function returns TRUE, it does not imply that this object
is a <a href="tqdomprocessinginstruction.html">TQDomProcessingInstruction</a>; you can get the
TQProcessingInstruction with <a href="#toProcessingInstruction">toProcessingInstruction</a>().
<p> <p>See also <a href="#toProcessingInstruction">toProcessingInstruction</a>().
<p>Reimplemented in <a href="tqdomprocessinginstruction.html#isProcessingInstruction">TQDomProcessingInstruction</a>.
<h3 class=fn>bool <a name="isSupported"></a>TQDomNode::isSupported ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;feature, const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;version ) const<tt> [virtual]</tt>
</h3>
Returns TRUE if the DOM implementation implements the feature <em>feature</em> and this feature is supported by this node in the version
<em>version</em>; otherwise returns FALSE.
<p> <p>See also <a href="tqdomimplementation.html#hasFeature">TQDomImplementation::hasFeature</a>().
<h3 class=fn>bool <a name="isText"></a>TQDomNode::isText () const<tt> [virtual]</tt>
</h3>
Returns TRUE if the node is a text node; otherwise returns FALSE.
<p> If this function returns TRUE, it does not imply that this object
is a <a href="tqdomtext.html">TQDomText</a>; you can get the TQDomText with <a href="#toText">toText</a>().
<p> <p>See also <a href="#toText">toText</a>().
<p>Reimplemented in <a href="tqdomtext.html#isText">TQDomText</a>.
<h3 class=fn><a href="tqdomnode.html">TQDomNode</a> <a name="lastChild"></a>TQDomNode::lastChild () const<tt> [virtual]</tt>
</h3>
Returns the last child of the node. If there is no child node, a
<a href="#isNull">null node</a> is returned. Changing the
returned node will also change the node in the document tree.
<p> <p>See also <a href="#firstChild">firstChild</a>() and <a href="#childNodes">childNodes</a>().
<h3 class=fn><a href="ntqstring.html">TQString</a> <a name="localName"></a>TQDomNode::localName () const<tt> [virtual]</tt>
</h3>
If the node uses namespaces, this function returns the local name
of the node; otherwise it returns <a href="ntqstring.html#TQString-null">TQString::null</a>.
<p> Only nodes of type <a href="#NodeType-enum">ElementNode</a> or
<a href="#NodeType-enum">AttributeNode</a> can have
namespaces. A namespace must have been specified at creation time;
it is not possible to add a namespace afterwards.
<p> <p>See also <a href="#prefix">prefix</a>(), <a href="#namespaceURI">namespaceURI</a>(), <a href="tqdomdocument.html#createElementNS">TQDomDocument::createElementNS</a>(), and <a href="tqdomdocument.html#createAttributeNS">TQDomDocument::createAttributeNS</a>().
<h3 class=fn><a href="tqdomnode.html">TQDomNode</a> <a name="namedItem"></a>TQDomNode::namedItem ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;name ) const
</h3>
Returns the first direct child node for which <a href="#nodeName">nodeName</a>() equals <em>name</em>.
<p> If no such direct child exists, a <a href="#isNull">null node</a>
is returned.
<p> <p>See also <a href="#nodeName">nodeName</a>().
<h3 class=fn><a href="ntqstring.html">TQString</a> <a name="namespaceURI"></a>TQDomNode::namespaceURI () const<tt> [virtual]</tt>
</h3>
Returns the namespace URI of this node or <a href="ntqstring.html#TQString-null">TQString::null</a> if the
node has no namespace URI.
<p> Only nodes of type <a href="#NodeType-enum">ElementNode</a> or
<a href="#NodeType-enum">AttributeNode</a> can have
namespaces. A namespace URI must be specified at creation time and
cannot be changed later.
<p> <p>See also <a href="#prefix">prefix</a>(), <a href="#localName">localName</a>(), <a href="tqdomdocument.html#createElementNS">TQDomDocument::createElementNS</a>(), and <a href="tqdomdocument.html#createAttributeNS">TQDomDocument::createAttributeNS</a>().
<h3 class=fn><a href="tqdomnode.html">TQDomNode</a> <a name="nextSibling"></a>TQDomNode::nextSibling () const<tt> [virtual]</tt>
</h3>
Returns the next sibling in the document tree. Changing the
returned node will also change the node in the document tree.
<p> If you have XML like this:
<pre>
&lt;h1&gt;Heading&lt;/h1&gt;
&lt;p&gt;The text...&lt;/p&gt;
&lt;h2&gt;Next heading&lt;/h2&gt;
</pre>
and this TQDomNode represents the &lt;p&gt; tag, <a href="#nextSibling">nextSibling</a>() will
return the node representing the &lt;h2&gt; tag.
<p> <p>See also <a href="#previousSibling">previousSibling</a>().
<p>Example: <a href="outliner-example.html#x1910">xml/outliner/outlinetree.cpp</a>.
<h3 class=fn><a href="ntqstring.html">TQString</a> <a name="nodeName"></a>TQDomNode::nodeName () const<tt> [virtual]</tt>
</h3>
Returns the name of the node.
<p> The meaning of the name depends on the subclass:
<center><table cellpadding="4" cellspacing="2" border="0">
<tr bgcolor="#a2c511"> <th valign="top">Name <th valign="top">Meaning
<tr bgcolor="#f0f0f0"> <td valign="top">TQDomAttr <td valign="top">The name of the attribute
<tr bgcolor="#d0d0d0"> <td valign="top">TQDomCDATASection <td valign="top">The string "#cdata-section"
<tr bgcolor="#f0f0f0"> <td valign="top">TQDomComment <td valign="top">The string "#comment"
<tr bgcolor="#d0d0d0"> <td valign="top">TQDomDocument <td valign="top">The string "#document"
<tr bgcolor="#f0f0f0"> <td valign="top">TQDomDocumentFragment <td valign="top">The string "#document-fragment"
<tr bgcolor="#d0d0d0"> <td valign="top">TQDomDocumentType <td valign="top">The name of the document type
<tr bgcolor="#f0f0f0"> <td valign="top">TQDomElement <td valign="top">The tag name
<tr bgcolor="#d0d0d0"> <td valign="top">TQDomEntity <td valign="top">The name of the entity
<tr bgcolor="#f0f0f0"> <td valign="top">TQDomEntityReference <td valign="top">The name of the referenced entity
<tr bgcolor="#d0d0d0"> <td valign="top">TQDomNotation <td valign="top">The name of the notation
<tr bgcolor="#f0f0f0"> <td valign="top">TQDomProcessingInstruction <td valign="top">The target of the processing instruction
<tr bgcolor="#d0d0d0"> <td valign="top">TQDomText <td valign="top">The string "#text"
</table></center>
<p> <p>See also <a href="#nodeValue">nodeValue</a>().
<p>Example: <a href="outliner-example.html#x1911">xml/outliner/outlinetree.cpp</a>.
<h3 class=fn><a href="tqdomnode.html#NodeType-enum">TQDomNode::NodeType</a> <a name="nodeType"></a>TQDomNode::nodeType () const<tt> [virtual]</tt>
</h3>
Returns the type of the node.
<p> <p>See also <a href="#toAttr">toAttr</a>(), <a href="#toCDATASection">toCDATASection</a>(), <a href="#toDocumentFragment">toDocumentFragment</a>(), <a href="#toDocument">toDocument</a>(), <a href="#toDocumentType">toDocumentType</a>(), <a href="#toElement">toElement</a>(), <a href="#toEntityReference">toEntityReference</a>(), <a href="#toText">toText</a>(), <a href="#toEntity">toEntity</a>(), <a href="#toNotation">toNotation</a>(), <a href="#toProcessingInstruction">toProcessingInstruction</a>(), <a href="#toCharacterData">toCharacterData</a>(), and <a href="#toComment">toComment</a>().
<p>Reimplemented in <a href="tqdomdocumenttype.html#nodeType">TQDomDocumentType</a>, <a href="tqdomdocument.html#nodeType">TQDomDocument</a>, <a href="tqdomdocumentfragment.html#nodeType">TQDomDocumentFragment</a>, <a href="tqdomcharacterdata.html#nodeType">TQDomCharacterData</a>, <a href="tqdomattr.html#nodeType">TQDomAttr</a>, <a href="tqdomelement.html#nodeType">TQDomElement</a>, <a href="tqdomnotation.html#nodeType">TQDomNotation</a>, <a href="tqdomentity.html#nodeType">TQDomEntity</a>, <a href="tqdomentityreference.html#nodeType">TQDomEntityReference</a>, and <a href="tqdomprocessinginstruction.html#nodeType">TQDomProcessingInstruction</a>.
<h3 class=fn><a href="ntqstring.html">TQString</a> <a name="nodeValue"></a>TQDomNode::nodeValue () const<tt> [virtual]</tt>
</h3>
Returns the value of the node.
<p> The meaning of the value depends on the subclass:
<center><table cellpadding="4" cellspacing="2" border="0">
<tr bgcolor="#a2c511"> <th valign="top">Name <th valign="top">Meaning
<tr bgcolor="#f0f0f0"> <td valign="top">TQDomAttr <td valign="top">The attribute value
<tr bgcolor="#d0d0d0"> <td valign="top">TQDomCDATASection <td valign="top">The content of the CDATA section
<tr bgcolor="#f0f0f0"> <td valign="top">TQDomComment <td valign="top">The comment
<tr bgcolor="#d0d0d0"> <td valign="top">TQDomProcessingInstruction <td valign="top">The data of the processing intruction
<tr bgcolor="#f0f0f0"> <td valign="top">TQDomText <td valign="top">The text
</table></center>
<p> All the other subclasses do not have a node value and will return
<a href="ntqstring.html#TQString-null">TQString::null</a>.
<p> <p>See also <a href="#setNodeValue">setNodeValue</a>() and <a href="#nodeName">nodeName</a>().
<p>Example: <a href="outliner-example.html#x1912">xml/outliner/outlinetree.cpp</a>.
<h3 class=fn>void <a name="normalize"></a>TQDomNode::normalize ()<tt> [virtual]</tt>
</h3>
Calling <a href="#normalize">normalize</a>() on an element converts all its children into a
standard form. This means that adjacent <a href="tqdomtext.html">TQDomText</a> objects will be
merged into a single text object (<a href="tqdomcdatasection.html">TQDomCDATASection</a> nodes are not
merged).
<h3 class=fn>bool <a name="operator!-eq"></a>TQDomNode::operator!= ( const&nbsp;<a href="tqdomnode.html">TQDomNode</a>&nbsp;&amp;&nbsp;n ) const
</h3>
Returns TRUE if <em>n</em> and this DOM node are not equal; otherwise
returns FALSE.
<h3 class=fn><a href="tqdomnode.html">TQDomNode</a>&nbsp;&amp; <a name="operator-eq"></a>TQDomNode::operator= ( const&nbsp;<a href="tqdomnode.html">TQDomNode</a>&nbsp;&amp;&nbsp;n )
</h3>
Assigns a copy of <em>n</em> to this DOM node.
<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="#cloneNode">cloneNode</a>().
<h3 class=fn>bool <a name="operator-eq-eq"></a>TQDomNode::operator== ( const&nbsp;<a href="tqdomnode.html">TQDomNode</a>&nbsp;&amp;&nbsp;n ) const
</h3>
Returns TRUE if <em>n</em> and this DOM node are equal; otherwise
returns FALSE.
<h3 class=fn><a href="tqdomdocument.html">TQDomDocument</a> <a name="ownerDocument"></a>TQDomNode::ownerDocument () const<tt> [virtual]</tt>
</h3>
Returns the document to which this node belongs.
<h3 class=fn><a href="tqdomnode.html">TQDomNode</a> <a name="parentNode"></a>TQDomNode::parentNode () const<tt> [virtual]</tt>
</h3>
Returns the parent node. If this node has no parent, a null node
is returned (i.e. a node for which <a href="#isNull">isNull</a>() returns TRUE).
<h3 class=fn><a href="ntqstring.html">TQString</a> <a name="prefix"></a>TQDomNode::prefix () const<tt> [virtual]</tt>
</h3>
Returns the namespace prefix of the node or <a href="ntqstring.html#TQString-null">TQString::null</a> if the
node has no namespace prefix.
<p> Only nodes of type <a href="#NodeType-enum">ElementNode</a> or
<a href="#NodeType-enum">AttributeNode</a> can have
namespaces. A namespace prefix must be specified at creation time.
If a node was created with a namespace prefix, you can change it
later with <a href="#setPrefix">setPrefix</a>().
<p> If you create an element or attribute with
<a href="tqdomdocument.html#createElement">TQDomDocument::createElement</a>() or <a href="tqdomdocument.html#createAttribute">TQDomDocument::createAttribute</a>(),
the prefix will be TQString::null. If you use
<a href="tqdomdocument.html#createElementNS">TQDomDocument::createElementNS</a>() or
<a href="tqdomdocument.html#createAttributeNS">TQDomDocument::createAttributeNS</a>() instead, the prefix will not be
TQString::null; but it might be an empty string if the name does
not have a prefix.
<p> <p>See also <a href="#setPrefix">setPrefix</a>(), <a href="#localName">localName</a>(), <a href="#namespaceURI">namespaceURI</a>(), <a href="tqdomdocument.html#createElementNS">TQDomDocument::createElementNS</a>(), and <a href="tqdomdocument.html#createAttributeNS">TQDomDocument::createAttributeNS</a>().
<h3 class=fn><a href="tqdomnode.html">TQDomNode</a> <a name="previousSibling"></a>TQDomNode::previousSibling () const<tt> [virtual]</tt>
</h3>
Returns the previous sibling in the document tree. Changing the
returned node will also change the node in the document tree.
<p> For example, if you have XML like this:
<pre>
&lt;h1&gt;Heading&lt;/h1&gt;
&lt;p&gt;The text...&lt;/p&gt;
&lt;h2&gt;Next heading&lt;/h2&gt;
</pre>
and this TQDomNode represents the &lt;p&gt; tag, <a href="#previousSibling">previousSibling</a>()
will return the node representing the &lt;h1&gt; tag.
<p> <p>See also <a href="#nextSibling">nextSibling</a>().
<h3 class=fn><a href="tqdomnode.html">TQDomNode</a> <a name="removeChild"></a>TQDomNode::removeChild ( const&nbsp;<a href="tqdomnode.html">TQDomNode</a>&nbsp;&amp;&nbsp;oldChild )<tt> [virtual]</tt>
</h3>
Removes <em>oldChild</em> from the list of children. <em>oldChild</em> must be
a direct child of this node.
<p> Returns a new reference to <em>oldChild</em> on success or a <a href="#isNull">null node</a> on failure.
<p> <p>See also <a href="#insertBefore">insertBefore</a>(), <a href="#insertAfter">insertAfter</a>(), <a href="#replaceChild">replaceChild</a>(), and <a href="#appendChild">appendChild</a>().
<h3 class=fn><a href="tqdomnode.html">TQDomNode</a> <a name="replaceChild"></a>TQDomNode::replaceChild ( const&nbsp;<a href="tqdomnode.html">TQDomNode</a>&nbsp;&amp;&nbsp;newChild, const&nbsp;<a href="tqdomnode.html">TQDomNode</a>&nbsp;&amp;&nbsp;oldChild )<tt> [virtual]</tt>
</h3>
Replaces <em>oldChild</em> with <em>newChild</em>. <em>oldChild</em> must be a
direct child of this node.
<p> If <em>newChild</em> is the child of another node, it is reparented to
this node. If <em>newChild</em> is a child of this node, then its
position in the list of children is changed.
<p> If <em>newChild</em> is a <a href="tqdomdocumentfragment.html">TQDomDocumentFragment</a>, then <em>oldChild</em> is
replaced by all of the children of the fragment.
<p> Returns a new reference to <em>oldChild</em> on success or a <a href="#isNull">null node</a> an failure.
<p> <p>See also <a href="#insertBefore">insertBefore</a>(), <a href="#insertAfter">insertAfter</a>(), <a href="#removeChild">removeChild</a>(), and <a href="#appendChild">appendChild</a>().
<h3 class=fn>void <a name="save"></a>TQDomNode::save ( <a href="ntqtextstream.html">TQTextStream</a>&nbsp;&amp;&nbsp;str, int&nbsp;indent ) const
</h3>
Writes the XML representation of the node and all its children to
the stream <em>str</em>. This function uses <em>indent</em> as the amount of
space to indent the node.
<h3 class=fn>void <a name="setNodeValue"></a>TQDomNode::setNodeValue ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;v )<tt> [virtual]</tt>
</h3>
Sets the node's value to <em>v</em>.
<p> <p>See also <a href="#nodeValue">nodeValue</a>().
<h3 class=fn>void <a name="setPrefix"></a>TQDomNode::setPrefix ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;pre )<tt> [virtual]</tt>
</h3>
If the node has a namespace prefix, this function changes the
namespace prefix of the node to <em>pre</em>. Otherwise this function
does nothing.
<p> Only nodes of type <a href="#NodeType-enum">ElementNode</a> or
<a href="#NodeType-enum">AttributeNode</a> can have
namespaces. A namespace prefix must have be specified at creation
time; it is not possible to add a namespace prefix afterwards.
<p> <p>See also <a href="#prefix">prefix</a>(), <a href="#localName">localName</a>(), <a href="#namespaceURI">namespaceURI</a>(), <a href="tqdomdocument.html#createElementNS">TQDomDocument::createElementNS</a>(), and <a href="tqdomdocument.html#createAttributeNS">TQDomDocument::createAttributeNS</a>().
<h3 class=fn><a href="tqdomattr.html">TQDomAttr</a> <a name="toAttr"></a>TQDomNode::toAttr ()
</h3>
Converts a TQDomNode into a <a href="tqdomattr.html">TQDomAttr</a>. If the node is not an
attribute, the returned object will be <a href="#isNull">null</a>.
<p> <p>See also <a href="#isAttr">isAttr</a>().
<h3 class=fn><a href="tqdomcdatasection.html">TQDomCDATASection</a> <a name="toCDATASection"></a>TQDomNode::toCDATASection ()
</h3>
Converts a TQDomNode into a <a href="tqdomcdatasection.html">TQDomCDATASection</a>. If the node is not a
CDATA section, the returned object will be <a href="#isNull">null</a>.
<p> <p>See also <a href="#isCDATASection">isCDATASection</a>().
<h3 class=fn><a href="tqdomcharacterdata.html">TQDomCharacterData</a> <a name="toCharacterData"></a>TQDomNode::toCharacterData ()
</h3>
Converts a TQDomNode into a <a href="tqdomcharacterdata.html">TQDomCharacterData</a>. If the node is not a
character data node the returned object will be <a href="#isNull">null</a>.
<p> <p>See also <a href="#isCharacterData">isCharacterData</a>().
<h3 class=fn><a href="tqdomcomment.html">TQDomComment</a> <a name="toComment"></a>TQDomNode::toComment ()
</h3>
Converts a TQDomNode into a <a href="tqdomcomment.html">TQDomComment</a>. If the node is not a
comment the returned object will be <a href="#isNull">null</a>.
<p> <p>See also <a href="#isComment">isComment</a>().
<h3 class=fn><a href="tqdomdocument.html">TQDomDocument</a> <a name="toDocument"></a>TQDomNode::toDocument ()
</h3>
Converts a TQDomNode into a <a href="tqdomdocument.html">TQDomDocument</a>. If the node is not a
document the returned object will be <a href="#isNull">null</a>.
<p> <p>See also <a href="#isDocument">isDocument</a>().
<h3 class=fn><a href="tqdomdocumentfragment.html">TQDomDocumentFragment</a> <a name="toDocumentFragment"></a>TQDomNode::toDocumentFragment ()
</h3>
Converts a TQDomNode into a <a href="tqdomdocumentfragment.html">TQDomDocumentFragment</a>. If the node is
not a document fragment the returned object will be <a href="#isNull">null</a>.
<p> <p>See also <a href="#isDocumentFragment">isDocumentFragment</a>().
<h3 class=fn><a href="tqdomdocumenttype.html">TQDomDocumentType</a> <a name="toDocumentType"></a>TQDomNode::toDocumentType ()
</h3>
Converts a TQDomNode into a <a href="tqdomdocumenttype.html">TQDomDocumentType</a>. If the node is not a
document type the returned object will be <a href="#isNull">null</a>.
<p> <p>See also <a href="#isDocumentType">isDocumentType</a>().
<h3 class=fn><a href="tqdomelement.html">TQDomElement</a> <a name="toElement"></a>TQDomNode::toElement ()
</h3>
Converts a TQDomNode into a <a href="tqdomelement.html">TQDomElement</a>. If the node is not an
element the returned object will be <a href="#isNull">null</a>.
<p> <p>See also <a href="#isElement">isElement</a>().
<p>Example: <a href="outliner-example.html#x1913">xml/outliner/outlinetree.cpp</a>.
<h3 class=fn><a href="tqdomentity.html">TQDomEntity</a> <a name="toEntity"></a>TQDomNode::toEntity ()
</h3>
Converts a TQDomNode into a <a href="tqdomentity.html">TQDomEntity</a>. If the node is not an
entity the returned object will be <a href="#isNull">null</a>.
<p> <p>See also <a href="#isEntity">isEntity</a>().
<h3 class=fn><a href="tqdomentityreference.html">TQDomEntityReference</a> <a name="toEntityReference"></a>TQDomNode::toEntityReference ()
</h3>
Converts a TQDomNode into a <a href="tqdomentityreference.html">TQDomEntityReference</a>. If the node is not
an entity reference, the returned object will be <a href="#isNull">null</a>.
<p> <p>See also <a href="#isEntityReference">isEntityReference</a>().
<h3 class=fn><a href="tqdomnotation.html">TQDomNotation</a> <a name="toNotation"></a>TQDomNode::toNotation ()
</h3>
Converts a TQDomNode into a <a href="tqdomnotation.html">TQDomNotation</a>. If the node is not a
notation the returned object will be <a href="#isNull">null</a>.
<p> <p>See also <a href="#isNotation">isNotation</a>().
<h3 class=fn><a href="tqdomprocessinginstruction.html">TQDomProcessingInstruction</a> <a name="toProcessingInstruction"></a>TQDomNode::toProcessingInstruction ()
</h3>
Converts a TQDomNode into a <a href="tqdomprocessinginstruction.html">TQDomProcessingInstruction</a>. If the node
is not a processing instruction the returned object will be <a href="#isNull">null</a>.
<p> <p>See also <a href="#isProcessingInstruction">isProcessingInstruction</a>().
<h3 class=fn><a href="tqdomtext.html">TQDomText</a> <a name="toText"></a>TQDomNode::toText ()
</h3>
Converts a TQDomNode into a <a href="tqdomtext.html">TQDomText</a>. If the node is not a text,
the returned object will be <a href="#isNull">null</a>.
<p> <p>See also <a href="#isText">isText</a>().
<hr><h2>Related Functions</h2>
<h3 class=fn><a href="ntqtextstream.html">TQTextStream</a>&nbsp;&amp; <a name="operator-lt-lt"></a>operator&lt;&lt; ( <a href="ntqtextstream.html">TQTextStream</a>&nbsp;&amp;&nbsp;str, const&nbsp;<a href="tqdomnode.html">TQDomNode</a>&nbsp;&amp;&nbsp;node )
</h3>
<p> Writes the XML representation of the node <em>node</em> and all its
children to the stream <em>str</em>.
<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">TQt 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>TQt 3.3.8</div>
</table></div></address></body>
</html>