<!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:1528 --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>QDomNode 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 Classes</font></a> | <a href="mainclasses.html"> <font color="#004faf">Main Classes</font></a> | <a href="annotated.html"> <font color="#004faf">Annotated</font></a> | <a href="groups.html"> <font color="#004faf">Grouped 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>QDomNode Class Reference<br><small>[<a href="xml.html">XML module</a>]</small></h1> <p>The QDomNode 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 Qt is built with thread support.</p> <p><tt>#include <<a href="qdom-h.html">qdom.h</a>></tt> <p>Inherited by <a href="qdomdocumenttype.html">QDomDocumentType</a>, <a href="qdomdocument.html">QDomDocument</a>, <a href="qdomdocumentfragment.html">QDomDocumentFragment</a>, <a href="qdomcharacterdata.html">QDomCharacterData</a>, <a href="qdomattr.html">QDomAttr</a>, <a href="qdomelement.html">QDomElement</a>, <a href="qdomnotation.html">QDomNotation</a>, <a href="qdomentity.html">QDomEntity</a>, <a href="qdomentityreference.html">QDomEntityReference</a>, and <a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a>. <p><a href="qdomnode-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="#QDomNode"><b>QDomNode</b></a> ()</li> <li class=fn><a href="#QDomNode-2"><b>QDomNode</b></a> ( const QDomNode & n )</li> <li class=fn>QDomNode & <a href="#operator-eq"><b>operator=</b></a> ( const QDomNode & n )</li> <li class=fn>bool <a href="#operator-eq-eq"><b>operator==</b></a> ( const QDomNode & n ) const</li> <li class=fn>bool <a href="#operator!-eq"><b>operator!=</b></a> ( const QDomNode & n ) const</li> <li class=fn>virtual <a href="#~QDomNode"><b>~QDomNode</b></a> ()</li> <li class=fn>virtual QDomNode <a href="#insertBefore"><b>insertBefore</b></a> ( const QDomNode & newChild, const QDomNode & refChild )</li> <li class=fn>virtual QDomNode <a href="#insertAfter"><b>insertAfter</b></a> ( const QDomNode & newChild, const QDomNode & refChild )</li> <li class=fn>virtual QDomNode <a href="#replaceChild"><b>replaceChild</b></a> ( const QDomNode & newChild, const QDomNode & oldChild )</li> <li class=fn>virtual QDomNode <a href="#removeChild"><b>removeChild</b></a> ( const QDomNode & oldChild )</li> <li class=fn>virtual QDomNode <a href="#appendChild"><b>appendChild</b></a> ( const QDomNode & newChild )</li> <li class=fn>virtual bool <a href="#hasChildNodes"><b>hasChildNodes</b></a> () const</li> <li class=fn>virtual QDomNode <a href="#cloneNode"><b>cloneNode</b></a> ( bool 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 QString & feature, const QString & version ) const</li> <li class=fn>virtual QString <a href="#nodeName"><b>nodeName</b></a> () const</li> <li class=fn>virtual QDomNode::NodeType <a href="#nodeType"><b>nodeType</b></a> () const</li> <li class=fn>virtual QDomNode <a href="#parentNode"><b>parentNode</b></a> () const</li> <li class=fn>virtual QDomNodeList <a href="#childNodes"><b>childNodes</b></a> () const</li> <li class=fn>virtual QDomNode <a href="#firstChild"><b>firstChild</b></a> () const</li> <li class=fn>virtual QDomNode <a href="#lastChild"><b>lastChild</b></a> () const</li> <li class=fn>virtual QDomNode <a href="#previousSibling"><b>previousSibling</b></a> () const</li> <li class=fn>virtual QDomNode <a href="#nextSibling"><b>nextSibling</b></a> () const</li> <li class=fn>virtual QDomNamedNodeMap <a href="#attributes"><b>attributes</b></a> () const</li> <li class=fn>virtual QDomDocument <a href="#ownerDocument"><b>ownerDocument</b></a> () const</li> <li class=fn>virtual QString <a href="#namespaceURI"><b>namespaceURI</b></a> () const</li> <li class=fn>virtual QString <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 QString <a href="#nodeValue"><b>nodeValue</b></a> () const</li> <li class=fn>virtual void <a href="#setNodeValue"><b>setNodeValue</b></a> ( const QString & v )</li> <li class=fn>virtual QString <a href="#prefix"><b>prefix</b></a> () const</li> <li class=fn>virtual void <a href="#setPrefix"><b>setPrefix</b></a> ( const QString & 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>QDomNode <a href="#namedItem"><b>namedItem</b></a> ( const QString & 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>QDomAttr <a href="#toAttr"><b>toAttr</b></a> ()</li> <li class=fn>QDomCDATASection <a href="#toCDATASection"><b>toCDATASection</b></a> ()</li> <li class=fn>QDomDocumentFragment <a href="#toDocumentFragment"><b>toDocumentFragment</b></a> ()</li> <li class=fn>QDomDocument <a href="#toDocument"><b>toDocument</b></a> ()</li> <li class=fn>QDomDocumentType <a href="#toDocumentType"><b>toDocumentType</b></a> ()</li> <li class=fn>QDomElement <a href="#toElement"><b>toElement</b></a> ()</li> <li class=fn>QDomEntityReference <a href="#toEntityReference"><b>toEntityReference</b></a> ()</li> <li class=fn>QDomText <a href="#toText"><b>toText</b></a> ()</li> <li class=fn>QDomEntity <a href="#toEntity"><b>toEntity</b></a> ()</li> <li class=fn>QDomNotation <a href="#toNotation"><b>toNotation</b></a> ()</li> <li class=fn>QDomProcessingInstruction <a href="#toProcessingInstruction"><b>toProcessingInstruction</b></a> ()</li> <li class=fn>QDomCharacterData <a href="#toCharacterData"><b>toCharacterData</b></a> ()</li> <li class=fn>QDomComment <a href="#toComment"><b>toComment</b></a> ()</li> <li class=fn>void <a href="#save"><b>save</b></a> ( QTextStream & str, int indent ) const</li> </ul> <h2>Related Functions</h2> <ul> <li class=fn>QTextStream & <a href="#operator-lt-lt"><b>operator<<</b></a> ( QTextStream & str, const QDomNode & node )</li> </ul> <hr><a name="details"></a><h2>Detailed Description</h2> The QDomNode class is the base class for all the nodes in a DOM tree. <p> <p> Many functions in the DOM return a QDomNode. <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 QDomNode 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 QDomNode 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 QDomNode, 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. QDomNode 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="qdomtext.html">QDomText</a> nodes can be merged into a single node with <a href="#normalize">normalize</a>(). <p> <a href="qdomelement.html">QDomElement</a> nodes have attributes which can be retrieved with <a href="#attributes">attributes</a>(). <p> <a href="qdomelement.html">QDomElement</a> and <a href="qdomattr.html">QDomAttr</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="qdomdocument.html">QDomDocument</a> d; d.<a href="qdomdocument.html#setContent">setContent</a>( someXML ); QDomNode n = d.<a href="#firstChild">firstChild</a>(); while ( !n.<a href="#isNull">isNull</a>() ) { if ( n.<a href="#isElement">isElement</a>() ) { <a href="qdomelement.html">QDomElement</a> e = n.<a href="#toElement">toElement</a>(); cout << "Element name: " << e.<a href="qdomelement.html#tagName">tagName</a>() << 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="qdomdocument.html">QDomDocument</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>QDomNode::NodeType</h3> <p> This enum defines the type of the node: <ul> <li><tt>QDomNode::ElementNode</tt> <li><tt>QDomNode::AttributeNode</tt> <li><tt>QDomNode::TextNode</tt> <li><tt>QDomNode::CDATASectionNode</tt> <li><tt>QDomNode::EntityReferenceNode</tt> <li><tt>QDomNode::EntityNode</tt> <li><tt>QDomNode::ProcessingInstructionNode</tt> <li><tt>QDomNode::CommentNode</tt> <li><tt>QDomNode::DocumentNode</tt> <li><tt>QDomNode::DocumentTypeNode</tt> <li><tt>QDomNode::DocumentFragmentNode</tt> <li><tt>QDomNode::NotationNode</tt> <li><tt>QDomNode::BaseNode</tt> - A QDomNode object, i.e. not a QDomNode subclass. <li><tt>QDomNode::CharacterDataNode</tt> </ul> <hr><h2>Member Function Documentation</h2> <h3 class=fn><a name="QDomNode"></a>QDomNode::QDomNode () </h3> Constructs a <a href="#isNull">null</a> node. <h3 class=fn><a name="QDomNode-2"></a>QDomNode::QDomNode ( const <a href="qdomnode.html">QDomNode</a> & 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="~QDomNode"></a>QDomNode::~QDomNode ()<tt> [virtual]</tt> </h3> Destroys the object and frees its resources. <h3 class=fn><a href="qdomnode.html">QDomNode</a> <a name="appendChild"></a>QDomNode::appendChild ( const <a href="qdomnode.html">QDomNode</a> & 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="qdomdocumentfragment.html">QDomDocumentFragment</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="qdomnamednodemap.html">QDomNamedNodeMap</a> <a name="attributes"></a>QDomNode::attributes () const<tt> [virtual]</tt> </h3> Returns a named node map of all attributes. Attributes are only provided for <a href="qdomelement.html">QDomElement</a>s. <p> Changing the attributes in the map will also change the attributes of this QDomNode. <p>Reimplemented in <a href="qdomelement.html#attributes">QDomElement</a>. <h3 class=fn><a href="qdomnodelist.html">QDomNodeList</a> <a name="childNodes"></a>QDomNode::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="qdomelement.html">QDomElement</a> object. <p> For example, if the XML document looks like this: <pre> <body> <h1>Heading</h1> <p>Hello <b>you</b></p> </body> </pre> Then the list of child nodes for the "body"-element will contain the node created by the <h1> tag and the node created by the <p> 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>QDomNode::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="qdomnode.html">QDomNode</a> <a name="cloneNode"></a>QDomNode::cloneNode ( bool deep = TRUE ) const<tt> [virtual]</tt> </h3> Creates a deep (not shallow) copy of the QDomNode. <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="qdomnode.html">QDomNode</a> <a name="firstChild"></a>QDomNode::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>QDomNode::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>QDomNode::hasChildNodes () const<tt> [virtual]</tt> </h3> Returns TRUE if the node has one or more children; otherwise returns FALSE. <h3 class=fn><a href="qdomnode.html">QDomNode</a> <a name="insertAfter"></a>QDomNode::insertAfter ( const <a href="qdomnode.html">QDomNode</a> & newChild, const <a href="qdomnode.html">QDomNode</a> & 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="qdomdocumentfragment.html">QDomDocumentFragment</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="qdomnode.html">QDomNode</a> <a name="insertBefore"></a>QDomNode::insertBefore ( const <a href="qdomnode.html">QDomNode</a> & newChild, const <a href="qdomnode.html">QDomNode</a> & 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="qdomdocumentfragment.html">QDomDocumentFragment</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>QDomNode::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 QDomAttribute; you can get the QDomAttribute with toAttribute(). <p> <p>See also <a href="#toAttr">toAttr</a>(). <p>Reimplemented in <a href="qdomattr.html#isAttr">QDomAttr</a>. <h3 class=fn>bool <a name="isCDATASection"></a>QDomNode::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="qdomcdatasection.html">QDomCDATASection</a>; you can get the QDomCDATASection with <a href="#toCDATASection">toCDATASection</a>(). <p> <p>See also <a href="#toCDATASection">toCDATASection</a>(). <p>Reimplemented in <a href="qdomcdatasection.html#isCDATASection">QDomCDATASection</a>. <h3 class=fn>bool <a name="isCharacterData"></a>QDomNode::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="qdomcharacterdata.html">QDomCharacterData</a>; you can get the QDomCharacterData with <a href="#toCharacterData">toCharacterData</a>(). <p> <p>See also <a href="#toCharacterData">toCharacterData</a>(). <p>Reimplemented in <a href="qdomcharacterdata.html#isCharacterData">QDomCharacterData</a>. <h3 class=fn>bool <a name="isComment"></a>QDomNode::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="qdomcomment.html">QDomComment</a>; you can get the QDomComment with <a href="#toComment">toComment</a>(). <p> <p>See also <a href="#toComment">toComment</a>(). <p>Reimplemented in <a href="qdomcomment.html#isComment">QDomComment</a>. <h3 class=fn>bool <a name="isDocument"></a>QDomNode::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="qdomdocument.html">QDomDocument</a>; you can get the QDomDocument with <a href="#toDocument">toDocument</a>(). <p> <p>See also <a href="#toDocument">toDocument</a>(). <p>Reimplemented in <a href="qdomdocument.html#isDocument">QDomDocument</a>. <h3 class=fn>bool <a name="isDocumentFragment"></a>QDomNode::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="qdomdocumentfragment.html">QDomDocumentFragment</a>; you can get the QDomDocumentFragment with <a href="#toDocumentFragment">toDocumentFragment</a>(). <p> <p>See also <a href="#toDocumentFragment">toDocumentFragment</a>(). <p>Reimplemented in <a href="qdomdocumentfragment.html#isDocumentFragment">QDomDocumentFragment</a>. <h3 class=fn>bool <a name="isDocumentType"></a>QDomNode::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="qdomdocumenttype.html">QDomDocumentType</a>; you can get the QDomDocumentType with <a href="#toDocumentType">toDocumentType</a>(). <p> <p>See also <a href="#toDocumentType">toDocumentType</a>(). <p>Reimplemented in <a href="qdomdocumenttype.html#isDocumentType">QDomDocumentType</a>. <h3 class=fn>bool <a name="isElement"></a>QDomNode::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="qdomelement.html">QDomElement</a>; you can get the QDomElement 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="qdomelement.html#isElement">QDomElement</a>. <h3 class=fn>bool <a name="isEntity"></a>QDomNode::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="qdomentity.html">QDomEntity</a>; you can get the QDomEntity with <a href="#toEntity">toEntity</a>(). <p> <p>See also <a href="#toEntity">toEntity</a>(). <p>Reimplemented in <a href="qdomentity.html#isEntity">QDomEntity</a>. <h3 class=fn>bool <a name="isEntityReference"></a>QDomNode::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="qdomentityreference.html">QDomEntityReference</a>; you can get the QDomEntityReference with <a href="#toEntityReference">toEntityReference</a>(). <p> <p>See also <a href="#toEntityReference">toEntityReference</a>(). <p>Reimplemented in <a href="qdomentityreference.html#isEntityReference">QDomEntityReference</a>. <h3 class=fn>bool <a name="isNotation"></a>QDomNode::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="qdomnotation.html">QDomNotation</a>; you can get the QDomNotation with <a href="#toNotation">toNotation</a>(). <p> <p>See also <a href="#toNotation">toNotation</a>(). <p>Reimplemented in <a href="qdomnotation.html#isNotation">QDomNotation</a>. <h3 class=fn>bool <a name="isNull"></a>QDomNode::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>QDomNode::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="qdomprocessinginstruction.html">QDomProcessingInstruction</a>; you can get the QProcessingInstruction with <a href="#toProcessingInstruction">toProcessingInstruction</a>(). <p> <p>See also <a href="#toProcessingInstruction">toProcessingInstruction</a>(). <p>Reimplemented in <a href="qdomprocessinginstruction.html#isProcessingInstruction">QDomProcessingInstruction</a>. <h3 class=fn>bool <a name="isSupported"></a>QDomNode::isSupported ( const <a href="qstring.html">QString</a> & feature, const <a href="qstring.html">QString</a> & 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="qdomimplementation.html#hasFeature">QDomImplementation::hasFeature</a>(). <h3 class=fn>bool <a name="isText"></a>QDomNode::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="qdomtext.html">QDomText</a>; you can get the QDomText with <a href="#toText">toText</a>(). <p> <p>See also <a href="#toText">toText</a>(). <p>Reimplemented in <a href="qdomtext.html#isText">QDomText</a>. <h3 class=fn><a href="qdomnode.html">QDomNode</a> <a name="lastChild"></a>QDomNode::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="qstring.html">QString</a> <a name="localName"></a>QDomNode::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="qstring.html#QString-null">QString::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="qdomdocument.html#createElementNS">QDomDocument::createElementNS</a>(), and <a href="qdomdocument.html#createAttributeNS">QDomDocument::createAttributeNS</a>(). <h3 class=fn><a href="qdomnode.html">QDomNode</a> <a name="namedItem"></a>QDomNode::namedItem ( const <a href="qstring.html">QString</a> & 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="qstring.html">QString</a> <a name="namespaceURI"></a>QDomNode::namespaceURI () const<tt> [virtual]</tt> </h3> Returns the namespace URI of this node or <a href="qstring.html#QString-null">QString::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="qdomdocument.html#createElementNS">QDomDocument::createElementNS</a>(), and <a href="qdomdocument.html#createAttributeNS">QDomDocument::createAttributeNS</a>(). <h3 class=fn><a href="qdomnode.html">QDomNode</a> <a name="nextSibling"></a>QDomNode::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> <h1>Heading</h1> <p>The text...</p> <h2>Next heading</h2> </pre> and this QDomNode represents the <p> tag, <a href="#nextSibling">nextSibling</a>() will return the node representing the <h2> 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="qstring.html">QString</a> <a name="nodeName"></a>QDomNode::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">QDomAttr <td valign="top">The name of the attribute <tr bgcolor="#d0d0d0"> <td valign="top">QDomCDATASection <td valign="top">The string "#cdata-section" <tr bgcolor="#f0f0f0"> <td valign="top">QDomComment <td valign="top">The string "#comment" <tr bgcolor="#d0d0d0"> <td valign="top">QDomDocument <td valign="top">The string "#document" <tr bgcolor="#f0f0f0"> <td valign="top">QDomDocumentFragment <td valign="top">The string "#document-fragment" <tr bgcolor="#d0d0d0"> <td valign="top">QDomDocumentType <td valign="top">The name of the document type <tr bgcolor="#f0f0f0"> <td valign="top">QDomElement <td valign="top">The tag name <tr bgcolor="#d0d0d0"> <td valign="top">QDomEntity <td valign="top">The name of the entity <tr bgcolor="#f0f0f0"> <td valign="top">QDomEntityReference <td valign="top">The name of the referenced entity <tr bgcolor="#d0d0d0"> <td valign="top">QDomNotation <td valign="top">The name of the notation <tr bgcolor="#f0f0f0"> <td valign="top">QDomProcessingInstruction <td valign="top">The target of the processing instruction <tr bgcolor="#d0d0d0"> <td valign="top">QDomText <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="qdomnode.html#NodeType-enum">QDomNode::NodeType</a> <a name="nodeType"></a>QDomNode::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="qdomdocumenttype.html#nodeType">QDomDocumentType</a>, <a href="qdomdocument.html#nodeType">QDomDocument</a>, <a href="qdomdocumentfragment.html#nodeType">QDomDocumentFragment</a>, <a href="qdomcharacterdata.html#nodeType">QDomCharacterData</a>, <a href="qdomattr.html#nodeType">QDomAttr</a>, <a href="qdomelement.html#nodeType">QDomElement</a>, <a href="qdomnotation.html#nodeType">QDomNotation</a>, <a href="qdomentity.html#nodeType">QDomEntity</a>, <a href="qdomentityreference.html#nodeType">QDomEntityReference</a>, and <a href="qdomprocessinginstruction.html#nodeType">QDomProcessingInstruction</a>. <h3 class=fn><a href="qstring.html">QString</a> <a name="nodeValue"></a>QDomNode::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">QDomAttr <td valign="top">The attribute value <tr bgcolor="#d0d0d0"> <td valign="top">QDomCDATASection <td valign="top">The content of the CDATA section <tr bgcolor="#f0f0f0"> <td valign="top">QDomComment <td valign="top">The comment <tr bgcolor="#d0d0d0"> <td valign="top">QDomProcessingInstruction <td valign="top">The data of the processing intruction <tr bgcolor="#f0f0f0"> <td valign="top">QDomText <td valign="top">The text </table></center> <p> All the other subclasses do not have a node value and will return <a href="qstring.html#QString-null">QString::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>QDomNode::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="qdomtext.html">QDomText</a> objects will be merged into a single text object (<a href="qdomcdatasection.html">QDomCDATASection</a> nodes are not merged). <h3 class=fn>bool <a name="operator!-eq"></a>QDomNode::operator!= ( const <a href="qdomnode.html">QDomNode</a> & n ) const </h3> Returns TRUE if <em>n</em> and this DOM node are not equal; otherwise returns FALSE. <h3 class=fn><a href="qdomnode.html">QDomNode</a> & <a name="operator-eq"></a>QDomNode::operator= ( const <a href="qdomnode.html">QDomNode</a> & 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>QDomNode::operator== ( const <a href="qdomnode.html">QDomNode</a> & n ) const </h3> Returns TRUE if <em>n</em> and this DOM node are equal; otherwise returns FALSE. <h3 class=fn><a href="qdomdocument.html">QDomDocument</a> <a name="ownerDocument"></a>QDomNode::ownerDocument () const<tt> [virtual]</tt> </h3> Returns the document to which this node belongs. <h3 class=fn><a href="qdomnode.html">QDomNode</a> <a name="parentNode"></a>QDomNode::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="qstring.html">QString</a> <a name="prefix"></a>QDomNode::prefix () const<tt> [virtual]</tt> </h3> Returns the namespace prefix of the node or <a href="qstring.html#QString-null">QString::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="qdomdocument.html#createElement">QDomDocument::createElement</a>() or <a href="qdomdocument.html#createAttribute">QDomDocument::createAttribute</a>(), the prefix will be QString::null. If you use <a href="qdomdocument.html#createElementNS">QDomDocument::createElementNS</a>() or <a href="qdomdocument.html#createAttributeNS">QDomDocument::createAttributeNS</a>() instead, the prefix will not be QString::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="qdomdocument.html#createElementNS">QDomDocument::createElementNS</a>(), and <a href="qdomdocument.html#createAttributeNS">QDomDocument::createAttributeNS</a>(). <h3 class=fn><a href="qdomnode.html">QDomNode</a> <a name="previousSibling"></a>QDomNode::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> <h1>Heading</h1> <p>The text...</p> <h2>Next heading</h2> </pre> and this QDomNode represents the <p> tag, <a href="#previousSibling">previousSibling</a>() will return the node representing the <h1> tag. <p> <p>See also <a href="#nextSibling">nextSibling</a>(). <h3 class=fn><a href="qdomnode.html">QDomNode</a> <a name="removeChild"></a>QDomNode::removeChild ( const <a href="qdomnode.html">QDomNode</a> & 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="qdomnode.html">QDomNode</a> <a name="replaceChild"></a>QDomNode::replaceChild ( const <a href="qdomnode.html">QDomNode</a> & newChild, const <a href="qdomnode.html">QDomNode</a> & 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="qdomdocumentfragment.html">QDomDocumentFragment</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>QDomNode::save ( <a href="qtextstream.html">QTextStream</a> & str, int 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>QDomNode::setNodeValue ( const <a href="qstring.html">QString</a> & 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>QDomNode::setPrefix ( const <a href="qstring.html">QString</a> & 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="qdomdocument.html#createElementNS">QDomDocument::createElementNS</a>(), and <a href="qdomdocument.html#createAttributeNS">QDomDocument::createAttributeNS</a>(). <h3 class=fn><a href="qdomattr.html">QDomAttr</a> <a name="toAttr"></a>QDomNode::toAttr () </h3> Converts a QDomNode into a <a href="qdomattr.html">QDomAttr</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="qdomcdatasection.html">QDomCDATASection</a> <a name="toCDATASection"></a>QDomNode::toCDATASection () </h3> Converts a QDomNode into a <a href="qdomcdatasection.html">QDomCDATASection</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="qdomcharacterdata.html">QDomCharacterData</a> <a name="toCharacterData"></a>QDomNode::toCharacterData () </h3> Converts a QDomNode into a <a href="qdomcharacterdata.html">QDomCharacterData</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="qdomcomment.html">QDomComment</a> <a name="toComment"></a>QDomNode::toComment () </h3> Converts a QDomNode into a <a href="qdomcomment.html">QDomComment</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="qdomdocument.html">QDomDocument</a> <a name="toDocument"></a>QDomNode::toDocument () </h3> Converts a QDomNode into a <a href="qdomdocument.html">QDomDocument</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="qdomdocumentfragment.html">QDomDocumentFragment</a> <a name="toDocumentFragment"></a>QDomNode::toDocumentFragment () </h3> Converts a QDomNode into a <a href="qdomdocumentfragment.html">QDomDocumentFragment</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="qdomdocumenttype.html">QDomDocumentType</a> <a name="toDocumentType"></a>QDomNode::toDocumentType () </h3> Converts a QDomNode into a <a href="qdomdocumenttype.html">QDomDocumentType</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="qdomelement.html">QDomElement</a> <a name="toElement"></a>QDomNode::toElement () </h3> Converts a QDomNode into a <a href="qdomelement.html">QDomElement</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="qdomentity.html">QDomEntity</a> <a name="toEntity"></a>QDomNode::toEntity () </h3> Converts a QDomNode into a <a href="qdomentity.html">QDomEntity</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="qdomentityreference.html">QDomEntityReference</a> <a name="toEntityReference"></a>QDomNode::toEntityReference () </h3> Converts a QDomNode into a <a href="qdomentityreference.html">QDomEntityReference</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="qdomnotation.html">QDomNotation</a> <a name="toNotation"></a>QDomNode::toNotation () </h3> Converts a QDomNode into a <a href="qdomnotation.html">QDomNotation</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="qdomprocessinginstruction.html">QDomProcessingInstruction</a> <a name="toProcessingInstruction"></a>QDomNode::toProcessingInstruction () </h3> Converts a QDomNode into a <a href="qdomprocessinginstruction.html">QDomProcessingInstruction</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="qdomtext.html">QDomText</a> <a name="toText"></a>QDomNode::toText () </h3> Converts a QDomNode into a <a href="qdomtext.html">QDomText</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="qtextstream.html">QTextStream</a> & <a name="operator-lt-lt"></a>operator<< ( <a href="qtextstream.html">QTextStream</a> & str, const <a href="qdomnode.html">QDomNode</a> & 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">Qt toolkit</a>. Copyright © 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 © 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>