📄 classtixmlnode.html
字号:
</div><div class="memdoc"><p>Return a pointer to the Document this node lives in. <p>Returns null if not in a document. </div></div><p><a class="anchor" name="d9b75e54ec19301c8b4d5ff583d0b3d5"></a><!-- doxytag: member="TiXmlNode::InsertAfterChild" ref="d9b75e54ec19301c8b4d5ff583d0b3d5" args="(TiXmlNode *afterThis, const TiXmlNode &addThis)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlNode::InsertAfterChild </td> <td>(</td> <td class="paramtype"><a class="el" href="classTiXmlNode.html">TiXmlNode</a> * </td> <td class="paramname"> <em>afterThis</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> & </td> <td class="paramname"> <em>addThis</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Add a new node related to this. <p>Adds a child after the specified child. Returns a pointer to the new object or NULL if an error occured. </div></div><p><a class="anchor" name="0c146fa2fff0157b681594102f48cbc7"></a><!-- doxytag: member="TiXmlNode::InsertBeforeChild" ref="0c146fa2fff0157b681594102f48cbc7" args="(TiXmlNode *beforeThis, const TiXmlNode &addThis)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlNode::InsertBeforeChild </td> <td>(</td> <td class="paramtype"><a class="el" href="classTiXmlNode.html">TiXmlNode</a> * </td> <td class="paramname"> <em>beforeThis</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> & </td> <td class="paramname"> <em>addThis</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Add a new node related to this. <p>Adds a child before the specified child. Returns a pointer to the new object or NULL if an error occured. </div></div><p><a class="anchor" name="d7d4630e1a2a916edda16be22448a8ba"></a><!-- doxytag: member="TiXmlNode::InsertEndChild" ref="d7d4630e1a2a916edda16be22448a8ba" args="(const TiXmlNode &addThis)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlNode::InsertEndChild </td> <td>(</td> <td class="paramtype">const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> & </td> <td class="paramname"> <em>addThis</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Add a new node related to this. <p>Adds a child past the LastChild. Returns a pointer to the new object or NULL if an error occured. </div></div><p><a class="anchor" name="8621196ba3705fa226bef4a761cc51b6"></a><!-- doxytag: member="TiXmlNode::IterateChildren" ref="8621196ba3705fa226bef4a761cc51b6" args="(const TiXmlNode *previous) const " --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlNode::IterateChildren </td> <td>(</td> <td class="paramtype">const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> * </td> <td class="paramname"> <em>previous</em> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table></div><div class="memdoc"><p>An alternate way to walk the children of a node. <p>One way to iterate over nodes is: <div class="fragment"><pre class="fragment"> for( child = parent->FirstChild(); child; child = child->NextSibling() ) </pre></div><p>IterateChildren does the same thing with the syntax: <div class="fragment"><pre class="fragment"> child = 0; while( child = parent->IterateChildren( child ) ) </pre></div><p>IterateChildren takes the previous child as input and finds the next one. If the previous child is null, it returns the first. IterateChildren will return null when done. </div></div><p><a class="anchor" name="5d29442ae46de6d0168429156197bfc6"></a><!-- doxytag: member="TiXmlNode::LinkEndChild" ref="5d29442ae46de6d0168429156197bfc6" args="(TiXmlNode *addThis)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlNode::LinkEndChild </td> <td>(</td> <td class="paramtype"><a class="el" href="classTiXmlNode.html">TiXmlNode</a> * </td> <td class="paramname"> <em>addThis</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Add a new node related to this. <p>Adds a child past the LastChild.<p>NOTE: the node to be added is passed by pointer, and will be henceforth owned (and deleted) by tinyXml. This method is efficient and avoids an extra copy, but should be used with care as it uses a different memory model than the other insert functions.<p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="classTiXmlNode.html#d7d4630e1a2a916edda16be22448a8ba">InsertEndChild</a> </dd></dl></div></div><p><a class="anchor" name="071ba77fd7ab79402fa84b7e9b8607b3"></a><!-- doxytag: member="TiXmlNode::NextSiblingElement" ref="071ba77fd7ab79402fa84b7e9b8607b3" args="(const char *) const " --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classTiXmlElement.html">TiXmlElement</a>* TiXmlNode::NextSiblingElement </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table></div><div class="memdoc"><p>Convenience function to get through elements. <p>Calls NextSibling and ToElement. Will skip all non-Element nodes. Returns 0 if there is not another element. </div></div><p><a class="anchor" name="73acf929d49d10bd0e5fb3d31b0372d1"></a><!-- doxytag: member="TiXmlNode::NextSiblingElement" ref="73acf929d49d10bd0e5fb3d31b0372d1" args="() const " --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classTiXmlElement.html">TiXmlElement</a>* TiXmlNode::NextSiblingElement </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table></div><div class="memdoc"><p>Convenience function to get through elements. <p>Calls NextSibling and ToElement. Will skip all non-Element nodes. Returns 0 if there is not another element. </div></div><p><a class="anchor" name="0c49e739a17b9938050c22cd89617fbd"></a><!-- doxytag: member="TiXmlNode::ReplaceChild" ref="0c49e739a17b9938050c22cd89617fbd" args="(TiXmlNode *replaceThis, const TiXmlNode &withThis)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlNode::ReplaceChild </td> <td>(</td> <td class="paramtype"><a class="el" href="classTiXmlNode.html">TiXmlNode</a> * </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -