1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xmlns="http://www.w3.org/1999/xhtml"> 3<head> 4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 5<meta http-equiv="X-UA-Compatible" content="IE=9"/> 6<meta name="generator" content="Doxygen 1.8.13"/> 7<meta name="viewport" content="width=device-width, initial-scale=1"/> 8<title>TinyXML-2: tinyxml2::XMLDocument Class Reference</title> 9<link href="tabs.css" rel="stylesheet" type="text/css"/> 10<script type="text/javascript" src="jquery.js"></script> 11<script type="text/javascript" src="dynsections.js"></script> 12<link href="search/search.css" rel="stylesheet" type="text/css"/> 13<script type="text/javascript" src="search/searchdata.js"></script> 14<script type="text/javascript" src="search/search.js"></script> 15<link href="doxygen.css" rel="stylesheet" type="text/css" /> 16</head> 17<body> 18<div id="top"><!-- do not remove this div, it is closed by doxygen! --> 19<div id="titlearea"> 20<table cellspacing="0" cellpadding="0"> 21 <tbody> 22 <tr style="height: 56px;"> 23 <td id="projectalign" style="padding-left: 0.5em;"> 24 <div id="projectname">TinyXML-2 25  <span id="projectnumber">7.0.0</span> 26 </div> 27 </td> 28 </tr> 29 </tbody> 30</table> 31</div> 32<!-- end header part --> 33<!-- Generated by Doxygen 1.8.13 --> 34<script type="text/javascript"> 35var searchBox = new SearchBox("searchBox", "search",false,'Search'); 36</script> 37<script type="text/javascript" src="menudata.js"></script> 38<script type="text/javascript" src="menu.js"></script> 39<script type="text/javascript"> 40$(function() { 41 initMenu('',true,false,'search.php','Search'); 42 $(document).ready(function() { init_search(); }); 43}); 44</script> 45<div id="main-nav"></div> 46<!-- window showing the filter options --> 47<div id="MSearchSelectWindow" 48 onmouseover="return searchBox.OnSearchSelectShow()" 49 onmouseout="return searchBox.OnSearchSelectHide()" 50 onkeydown="return searchBox.OnSearchSelectKey(event)"> 51</div> 52 53<!-- iframe showing the search results (closed by default) --> 54<div id="MSearchResultsWindow"> 55<iframe src="javascript:void(0)" frameborder="0" 56 name="MSearchResults" id="MSearchResults"> 57</iframe> 58</div> 59 60<div id="nav-path" class="navpath"> 61 <ul> 62<li class="navelem"><b>tinyxml2</b></li><li class="navelem"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html">XMLDocument</a></li> </ul> 63</div> 64</div><!-- top --> 65<div class="header"> 66 <div class="summary"> 67<a href="#pub-methods">Public Member Functions</a> | 68<a href="classtinyxml2_1_1_x_m_l_document-members.html">List of all members</a> </div> 69 <div class="headertitle"> 70<div class="title">tinyxml2::XMLDocument Class Reference</div> </div> 71</div><!--header--> 72<div class="contents"> 73 74<p><code>#include <<a class="el" href="tinyxml2_8h_source.html">tinyxml2.h</a>></code></p> 75<div class="dynheader"> 76Inheritance diagram for tinyxml2::XMLDocument:</div> 77<div class="dyncontent"> 78 <div class="center"> 79 <img src="classtinyxml2_1_1_x_m_l_document.png" usemap="#tinyxml2::XMLDocument_map" alt=""/> 80 <map id="tinyxml2::XMLDocument_map" name="tinyxml2::XMLDocument_map"> 81<area href="classtinyxml2_1_1_x_m_l_node.html" alt="tinyxml2::XMLNode" shape="rect" coords="0,0,146,24"/> 82</map> 83 </div></div> 84<table class="memberdecls"> 85<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> 86Public Member Functions</h2></td></tr> 87<tr class="memitem:a57ddf17b6e054dda10af98991b1b8f70"><td class="memItemLeft" align="right" valign="top"><a id="a57ddf17b6e054dda10af98991b1b8f70"></a> 88 </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a57ddf17b6e054dda10af98991b1b8f70">XMLDocument</a> (bool processEntities=true, Whitespace whitespaceMode=PRESERVE_WHITESPACE)</td></tr> 89<tr class="memdesc:a57ddf17b6e054dda10af98991b1b8f70"><td class="mdescLeft"> </td><td class="mdescRight">constructor <br /></td></tr> 90<tr class="separator:a57ddf17b6e054dda10af98991b1b8f70"><td class="memSeparator" colspan="2"> </td></tr> 91<tr class="memitem:a3e185f880882bd978367bb55937735ec"><td class="memItemLeft" align="right" valign="top"><a id="a3e185f880882bd978367bb55937735ec"></a> 92virtual <a class="el" href="classtinyxml2_1_1_x_m_l_document.html">XMLDocument</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a3e185f880882bd978367bb55937735ec">ToDocument</a> ()</td></tr> 93<tr class="memdesc:a3e185f880882bd978367bb55937735ec"><td class="mdescLeft"> </td><td class="mdescRight">Safely cast to a Document, or null. <br /></td></tr> 94<tr class="separator:a3e185f880882bd978367bb55937735ec"><td class="memSeparator" colspan="2"> </td></tr> 95<tr class="memitem:a1819bd34f540a7304c105a6232d25a1f"><td class="memItemLeft" align="right" valign="top">XMLError </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a1819bd34f540a7304c105a6232d25a1f">Parse</a> (const char *xml, size_t nBytes=(size_t)(-1))</td></tr> 96<tr class="separator:a1819bd34f540a7304c105a6232d25a1f"><td class="memSeparator" colspan="2"> </td></tr> 97<tr class="memitem:a2ebd4647a8af5fc6831b294ac26a150a"><td class="memItemLeft" align="right" valign="top">XMLError </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a2ebd4647a8af5fc6831b294ac26a150a">LoadFile</a> (const char *filename)</td></tr> 98<tr class="separator:a2ebd4647a8af5fc6831b294ac26a150a"><td class="memSeparator" colspan="2"> </td></tr> 99<tr class="memitem:a5f1d330fad44c52f3d265338dd2a6dc2"><td class="memItemLeft" align="right" valign="top">XMLError </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a5f1d330fad44c52f3d265338dd2a6dc2">LoadFile</a> (FILE *)</td></tr> 100<tr class="separator:a5f1d330fad44c52f3d265338dd2a6dc2"><td class="memSeparator" colspan="2"> </td></tr> 101<tr class="memitem:a73ac416b4a2aa0952e841220eb3da18f"><td class="memItemLeft" align="right" valign="top">XMLError </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a73ac416b4a2aa0952e841220eb3da18f">SaveFile</a> (const char *filename, bool compact=false)</td></tr> 102<tr class="separator:a73ac416b4a2aa0952e841220eb3da18f"><td class="memSeparator" colspan="2"> </td></tr> 103<tr class="memitem:a8b95779479a0035acc67b3a61dfe1b74"><td class="memItemLeft" align="right" valign="top">XMLError </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a8b95779479a0035acc67b3a61dfe1b74">SaveFile</a> (FILE *fp, bool compact=false)</td></tr> 104<tr class="separator:a8b95779479a0035acc67b3a61dfe1b74"><td class="memSeparator" colspan="2"> </td></tr> 105<tr class="memitem:a33fc5d159db873a179fa26338adb05bd"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a33fc5d159db873a179fa26338adb05bd">HasBOM</a> () const</td></tr> 106<tr class="separator:a33fc5d159db873a179fa26338adb05bd"><td class="memSeparator" colspan="2"> </td></tr> 107<tr class="memitem:a14419b698f7c4b140df4e80f3f0c93b0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a14419b698f7c4b140df4e80f3f0c93b0">SetBOM</a> (bool useBOM)</td></tr> 108<tr class="separator:a14419b698f7c4b140df4e80f3f0c93b0"><td class="memSeparator" colspan="2"> </td></tr> 109<tr class="memitem:ad2b70320d3c2a071c2f36928edff3e1c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">XMLElement</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#ad2b70320d3c2a071c2f36928edff3e1c">RootElement</a> ()</td></tr> 110<tr class="separator:ad2b70320d3c2a071c2f36928edff3e1c"><td class="memSeparator" colspan="2"> </td></tr> 111<tr class="memitem:a867cf5fa3e3ff6ae4847a8b7ee8ec083"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a867cf5fa3e3ff6ae4847a8b7ee8ec083">Print</a> (<a class="el" href="classtinyxml2_1_1_x_m_l_printer.html">XMLPrinter</a> *streamer=0) const</td></tr> 112<tr class="separator:a867cf5fa3e3ff6ae4847a8b7ee8ec083"><td class="memSeparator" colspan="2"> </td></tr> 113<tr class="memitem:a9efa54f7ecb37c17ab1fa2b3078ccca1"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a9efa54f7ecb37c17ab1fa2b3078ccca1">Accept</a> (<a class="el" href="classtinyxml2_1_1_x_m_l_visitor.html">XMLVisitor</a> *visitor) const</td></tr> 114<tr class="separator:a9efa54f7ecb37c17ab1fa2b3078ccca1"><td class="memSeparator" colspan="2"> </td></tr> 115<tr class="memitem:a8aa7817d4a1001364b06373763ab99d6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">XMLElement</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a8aa7817d4a1001364b06373763ab99d6">NewElement</a> (const char *name)</td></tr> 116<tr class="separator:a8aa7817d4a1001364b06373763ab99d6"><td class="memSeparator" colspan="2"> </td></tr> 117<tr class="memitem:ade4874bcb439954972ef2b3723ff3259"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtinyxml2_1_1_x_m_l_comment.html">XMLComment</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#ade4874bcb439954972ef2b3723ff3259">NewComment</a> (const char *comment)</td></tr> 118<tr class="separator:ade4874bcb439954972ef2b3723ff3259"><td class="memSeparator" colspan="2"> </td></tr> 119<tr class="memitem:ab7e8b29ae4099092a8bb947da6361296"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtinyxml2_1_1_x_m_l_text.html">XMLText</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#ab7e8b29ae4099092a8bb947da6361296">NewText</a> (const char *text)</td></tr> 120<tr class="separator:ab7e8b29ae4099092a8bb947da6361296"><td class="memSeparator" colspan="2"> </td></tr> 121<tr class="memitem:aee2eb3435923f5494dcc70ac225b60a2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtinyxml2_1_1_x_m_l_declaration.html">XMLDeclaration</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#aee2eb3435923f5494dcc70ac225b60a2">NewDeclaration</a> (const char *text=0)</td></tr> 122<tr class="separator:aee2eb3435923f5494dcc70ac225b60a2"><td class="memSeparator" colspan="2"> </td></tr> 123<tr class="memitem:a5385c937734ff6db9226ab707d2c7147"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtinyxml2_1_1_x_m_l_unknown.html">XMLUnknown</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a5385c937734ff6db9226ab707d2c7147">NewUnknown</a> (const char *text)</td></tr> 124<tr class="separator:a5385c937734ff6db9226ab707d2c7147"><td class="memSeparator" colspan="2"> </td></tr> 125<tr class="memitem:ac1d6e2c7fcc1a660624ac4f68e96380d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#ac1d6e2c7fcc1a660624ac4f68e96380d">DeleteNode</a> (<a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> *node)</td></tr> 126<tr class="separator:ac1d6e2c7fcc1a660624ac4f68e96380d"><td class="memSeparator" colspan="2"> </td></tr> 127<tr class="memitem:a34e6318e182e40e3cc4f4ba5d59ed9ed"><td class="memItemLeft" align="right" valign="top"><a id="a34e6318e182e40e3cc4f4ba5d59ed9ed"></a> 128bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a34e6318e182e40e3cc4f4ba5d59ed9ed">Error</a> () const</td></tr> 129<tr class="memdesc:a34e6318e182e40e3cc4f4ba5d59ed9ed"><td class="mdescLeft"> </td><td class="mdescRight">Return true if there was an error parsing the document. <br /></td></tr> 130<tr class="separator:a34e6318e182e40e3cc4f4ba5d59ed9ed"><td class="memSeparator" colspan="2"> </td></tr> 131<tr class="memitem:afa3ed33b3107f920ec2b301f805ac17d"><td class="memItemLeft" align="right" valign="top"><a id="afa3ed33b3107f920ec2b301f805ac17d"></a> 132XMLError </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#afa3ed33b3107f920ec2b301f805ac17d">ErrorID</a> () const</td></tr> 133<tr class="memdesc:afa3ed33b3107f920ec2b301f805ac17d"><td class="mdescLeft"> </td><td class="mdescRight">Return the errorID. <br /></td></tr> 134<tr class="separator:afa3ed33b3107f920ec2b301f805ac17d"><td class="memSeparator" colspan="2"> </td></tr> 135<tr class="memitem:ad75aa9d32c4e8b300655186808aa9abf"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#ad75aa9d32c4e8b300655186808aa9abf">ErrorStr</a> () const</td></tr> 136<tr class="separator:ad75aa9d32c4e8b300655186808aa9abf"><td class="memSeparator" colspan="2"> </td></tr> 137<tr class="memitem:a1d033945b42e125d933d6231e4571552"><td class="memItemLeft" align="right" valign="top"><a id="a1d033945b42e125d933d6231e4571552"></a> 138void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a1d033945b42e125d933d6231e4571552">PrintError</a> () const</td></tr> 139<tr class="memdesc:a1d033945b42e125d933d6231e4571552"><td class="mdescLeft"> </td><td class="mdescRight">A (trivial) utility function that prints the <a class="el" href="classtinyxml2_1_1_x_m_l_document.html#ad75aa9d32c4e8b300655186808aa9abf">ErrorStr()</a> to stdout. <br /></td></tr> 140<tr class="separator:a1d033945b42e125d933d6231e4571552"><td class="memSeparator" colspan="2"> </td></tr> 141<tr class="memitem:a57400f816dbe7799ece33615ead9ab76"><td class="memItemLeft" align="right" valign="top"><a id="a57400f816dbe7799ece33615ead9ab76"></a> 142int </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a57400f816dbe7799ece33615ead9ab76">ErrorLineNum</a> () const</td></tr> 143<tr class="memdesc:a57400f816dbe7799ece33615ead9ab76"><td class="mdescLeft"> </td><td class="mdescRight">Return the line where the error occurred, or zero if unknown. <br /></td></tr> 144<tr class="separator:a57400f816dbe7799ece33615ead9ab76"><td class="memSeparator" colspan="2"> </td></tr> 145<tr class="memitem:a65656b0b2cbc822708eb351504178aaf"><td class="memItemLeft" align="right" valign="top"><a id="a65656b0b2cbc822708eb351504178aaf"></a> 146void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a65656b0b2cbc822708eb351504178aaf">Clear</a> ()</td></tr> 147<tr class="memdesc:a65656b0b2cbc822708eb351504178aaf"><td class="mdescLeft"> </td><td class="mdescRight">Clear the document, resetting it to the initial state. <br /></td></tr> 148<tr class="separator:a65656b0b2cbc822708eb351504178aaf"><td class="memSeparator" colspan="2"> </td></tr> 149<tr class="memitem:af592ffc91514e25a39664521ac83db45"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#af592ffc91514e25a39664521ac83db45">DeepCopy</a> (<a class="el" href="classtinyxml2_1_1_x_m_l_document.html">XMLDocument</a> *target) const</td></tr> 150<tr class="separator:af592ffc91514e25a39664521ac83db45"><td class="memSeparator" colspan="2"> </td></tr> 151<tr class="memitem:aa37cc1709d7e1e988bc17dcfb24a69b8"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#aa37cc1709d7e1e988bc17dcfb24a69b8">ShallowClone</a> (<a class="el" href="classtinyxml2_1_1_x_m_l_document.html">XMLDocument</a> *) const</td></tr> 152<tr class="separator:aa37cc1709d7e1e988bc17dcfb24a69b8"><td class="memSeparator" colspan="2"> </td></tr> 153<tr class="memitem:a6fe5ef18699091844fcf64b56ffa5bf9"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a6fe5ef18699091844fcf64b56ffa5bf9">ShallowEqual</a> (const <a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> *) const</td></tr> 154<tr class="separator:a6fe5ef18699091844fcf64b56ffa5bf9"><td class="memSeparator" colspan="2"> </td></tr> 155<tr class="inherit_header pub_methods_classtinyxml2_1_1_x_m_l_node"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classtinyxml2_1_1_x_m_l_node')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classtinyxml2_1_1_x_m_l_node.html">tinyxml2::XMLNode</a></td></tr> 156<tr class="memitem:a2de84cfa4ec3fe249bad745069d145f1 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a id="a2de84cfa4ec3fe249bad745069d145f1"></a> 157const <a class="el" href="classtinyxml2_1_1_x_m_l_document.html">XMLDocument</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a2de84cfa4ec3fe249bad745069d145f1">GetDocument</a> () const</td></tr> 158<tr class="memdesc:a2de84cfa4ec3fe249bad745069d145f1 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="mdescLeft"> </td><td class="mdescRight">Get the <a class="el" href="classtinyxml2_1_1_x_m_l_document.html">XMLDocument</a> that owns this <a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a>. <br /></td></tr> 159<tr class="separator:a2de84cfa4ec3fe249bad745069d145f1 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 160<tr class="memitem:af343d1ef0b45c0020e62d784d7e67a68 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a id="af343d1ef0b45c0020e62d784d7e67a68"></a> 161<a class="el" href="classtinyxml2_1_1_x_m_l_document.html">XMLDocument</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#af343d1ef0b45c0020e62d784d7e67a68">GetDocument</a> ()</td></tr> 162<tr class="memdesc:af343d1ef0b45c0020e62d784d7e67a68 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="mdescLeft"> </td><td class="mdescRight">Get the <a class="el" href="classtinyxml2_1_1_x_m_l_document.html">XMLDocument</a> that owns this <a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a>. <br /></td></tr> 163<tr class="separator:af343d1ef0b45c0020e62d784d7e67a68 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 164<tr class="memitem:aab516e699567f75cc9ab2ef2eee501e8 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a id="aab516e699567f75cc9ab2ef2eee501e8"></a> 165virtual <a class="el" href="classtinyxml2_1_1_x_m_l_element.html">XMLElement</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#aab516e699567f75cc9ab2ef2eee501e8">ToElement</a> ()</td></tr> 166<tr class="memdesc:aab516e699567f75cc9ab2ef2eee501e8 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="mdescLeft"> </td><td class="mdescRight">Safely cast to an Element, or null. <br /></td></tr> 167<tr class="separator:aab516e699567f75cc9ab2ef2eee501e8 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 168<tr class="memitem:a41c55dab9162d1eb62db2008430e376b inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a id="a41c55dab9162d1eb62db2008430e376b"></a> 169virtual <a class="el" href="classtinyxml2_1_1_x_m_l_text.html">XMLText</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a41c55dab9162d1eb62db2008430e376b">ToText</a> ()</td></tr> 170<tr class="memdesc:a41c55dab9162d1eb62db2008430e376b inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="mdescLeft"> </td><td class="mdescRight">Safely cast to Text, or null. <br /></td></tr> 171<tr class="separator:a41c55dab9162d1eb62db2008430e376b inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 172<tr class="memitem:aff47671055aa99840a1c1ebd661e63e3 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a id="aff47671055aa99840a1c1ebd661e63e3"></a> 173virtual <a class="el" href="classtinyxml2_1_1_x_m_l_comment.html">XMLComment</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#aff47671055aa99840a1c1ebd661e63e3">ToComment</a> ()</td></tr> 174<tr class="memdesc:aff47671055aa99840a1c1ebd661e63e3 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="mdescLeft"> </td><td class="mdescRight">Safely cast to a Comment, or null. <br /></td></tr> 175<tr class="separator:aff47671055aa99840a1c1ebd661e63e3 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 176<tr class="memitem:a174fd4c22c010b58138c1b84a0dfbd51 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a id="a174fd4c22c010b58138c1b84a0dfbd51"></a> 177virtual <a class="el" href="classtinyxml2_1_1_x_m_l_declaration.html">XMLDeclaration</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a174fd4c22c010b58138c1b84a0dfbd51">ToDeclaration</a> ()</td></tr> 178<tr class="memdesc:a174fd4c22c010b58138c1b84a0dfbd51 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="mdescLeft"> </td><td class="mdescRight">Safely cast to a Declaration, or null. <br /></td></tr> 179<tr class="separator:a174fd4c22c010b58138c1b84a0dfbd51 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 180<tr class="memitem:a8675a74aa0ada6eccab0c77ef3e5b9bd inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a id="a8675a74aa0ada6eccab0c77ef3e5b9bd"></a> 181virtual <a class="el" href="classtinyxml2_1_1_x_m_l_unknown.html">XMLUnknown</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a8675a74aa0ada6eccab0c77ef3e5b9bd">ToUnknown</a> ()</td></tr> 182<tr class="memdesc:a8675a74aa0ada6eccab0c77ef3e5b9bd inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="mdescLeft"> </td><td class="mdescRight">Safely cast to an Unknown, or null. <br /></td></tr> 183<tr class="separator:a8675a74aa0ada6eccab0c77ef3e5b9bd inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 184<tr class="memitem:a66344989a4b436155bcda72bd6b07b82 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a66344989a4b436155bcda72bd6b07b82">Value</a> () const</td></tr> 185<tr class="separator:a66344989a4b436155bcda72bd6b07b82 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 186<tr class="memitem:a09dd68cf9eae137579f6e50f36487513 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a09dd68cf9eae137579f6e50f36487513">SetValue</a> (const char *val, bool staticMem=false)</td></tr> 187<tr class="separator:a09dd68cf9eae137579f6e50f36487513 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 188<tr class="memitem:a9b5fc636646fda761d342c72e91cb286 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a id="a9b5fc636646fda761d342c72e91cb286"></a> 189int </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a9b5fc636646fda761d342c72e91cb286">GetLineNum</a> () const</td></tr> 190<tr class="memdesc:a9b5fc636646fda761d342c72e91cb286 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="mdescLeft"> </td><td class="mdescRight">Gets the line number the node is in, if the document was parsed from a file. <br /></td></tr> 191<tr class="separator:a9b5fc636646fda761d342c72e91cb286 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 192<tr class="memitem:ae0f62bc186c56c2e0483ebd52dbfbe34 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a id="ae0f62bc186c56c2e0483ebd52dbfbe34"></a> 193const <a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#ae0f62bc186c56c2e0483ebd52dbfbe34">Parent</a> () const</td></tr> 194<tr class="memdesc:ae0f62bc186c56c2e0483ebd52dbfbe34 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="mdescLeft"> </td><td class="mdescRight">Get the parent of this node on the DOM. <br /></td></tr> 195<tr class="separator:ae0f62bc186c56c2e0483ebd52dbfbe34 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 196<tr class="memitem:ac3ab489e6e202a3cd1762d3b332e89d4 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a id="ac3ab489e6e202a3cd1762d3b332e89d4"></a> 197bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#ac3ab489e6e202a3cd1762d3b332e89d4">NoChildren</a> () const</td></tr> 198<tr class="memdesc:ac3ab489e6e202a3cd1762d3b332e89d4 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if this node has no children. <br /></td></tr> 199<tr class="separator:ac3ab489e6e202a3cd1762d3b332e89d4 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 200<tr class="memitem:ae7dc225e1018cdd685f7563593a1fe08 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a id="ae7dc225e1018cdd685f7563593a1fe08"></a> 201const <a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#ae7dc225e1018cdd685f7563593a1fe08">FirstChild</a> () const</td></tr> 202<tr class="memdesc:ae7dc225e1018cdd685f7563593a1fe08 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="mdescLeft"> </td><td class="mdescRight">Get the first child node, or null if none exists. <br /></td></tr> 203<tr class="separator:ae7dc225e1018cdd685f7563593a1fe08 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 204<tr class="memitem:a1795a35852dc8aae877cc8ded986e59b inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classtinyxml2_1_1_x_m_l_element.html">XMLElement</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a1795a35852dc8aae877cc8ded986e59b">FirstChildElement</a> (const char *name=0) const</td></tr> 205<tr class="separator:a1795a35852dc8aae877cc8ded986e59b inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 206<tr class="memitem:a9b8583a277e8e26f4cbbb5492786778e inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a id="a9b8583a277e8e26f4cbbb5492786778e"></a> 207const <a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a9b8583a277e8e26f4cbbb5492786778e">LastChild</a> () const</td></tr> 208<tr class="memdesc:a9b8583a277e8e26f4cbbb5492786778e inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="mdescLeft"> </td><td class="mdescRight">Get the last child node, or null if none exists. <br /></td></tr> 209<tr class="separator:a9b8583a277e8e26f4cbbb5492786778e inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 210<tr class="memitem:a173e9d1341bc56992e2d320a35936551 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classtinyxml2_1_1_x_m_l_element.html">XMLElement</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a173e9d1341bc56992e2d320a35936551">LastChildElement</a> (const char *name=0) const</td></tr> 211<tr class="separator:a173e9d1341bc56992e2d320a35936551 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 212<tr class="memitem:aac667c513d445f8b783e1e15ef9d3551 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a id="aac667c513d445f8b783e1e15ef9d3551"></a> 213const <a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#aac667c513d445f8b783e1e15ef9d3551">PreviousSibling</a> () const</td></tr> 214<tr class="memdesc:aac667c513d445f8b783e1e15ef9d3551 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="mdescLeft"> </td><td class="mdescRight">Get the previous (left) sibling node of this node. <br /></td></tr> 215<tr class="separator:aac667c513d445f8b783e1e15ef9d3551 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 216<tr class="memitem:a872936cae46fb473eb47fec99129fc70 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a id="a872936cae46fb473eb47fec99129fc70"></a> 217const <a class="el" href="classtinyxml2_1_1_x_m_l_element.html">XMLElement</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a872936cae46fb473eb47fec99129fc70">PreviousSiblingElement</a> (const char *name=0) const</td></tr> 218<tr class="memdesc:a872936cae46fb473eb47fec99129fc70 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="mdescLeft"> </td><td class="mdescRight">Get the previous (left) sibling element of this node, with an optionally supplied name. <br /></td></tr> 219<tr class="separator:a872936cae46fb473eb47fec99129fc70 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 220<tr class="memitem:a79db9ef0fe014d27790f2218b87bcbb5 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a id="a79db9ef0fe014d27790f2218b87bcbb5"></a> 221const <a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a79db9ef0fe014d27790f2218b87bcbb5">NextSibling</a> () const</td></tr> 222<tr class="memdesc:a79db9ef0fe014d27790f2218b87bcbb5 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="mdescLeft"> </td><td class="mdescRight">Get the next (right) sibling node of this node. <br /></td></tr> 223<tr class="separator:a79db9ef0fe014d27790f2218b87bcbb5 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 224<tr class="memitem:a1264c86233328f0cd36297552d982f80 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a id="a1264c86233328f0cd36297552d982f80"></a> 225const <a class="el" href="classtinyxml2_1_1_x_m_l_element.html">XMLElement</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a1264c86233328f0cd36297552d982f80">NextSiblingElement</a> (const char *name=0) const</td></tr> 226<tr class="memdesc:a1264c86233328f0cd36297552d982f80 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="mdescLeft"> </td><td class="mdescRight">Get the next (right) sibling element of this node, with an optionally supplied name. <br /></td></tr> 227<tr class="separator:a1264c86233328f0cd36297552d982f80 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 228<tr class="memitem:aeb249ed60f4e8bfad3709151c3ee4286 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#aeb249ed60f4e8bfad3709151c3ee4286">InsertEndChild</a> (<a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> *addThis)</td></tr> 229<tr class="separator:aeb249ed60f4e8bfad3709151c3ee4286 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 230<tr class="memitem:a8ff7dc071f3a1a6ae2ac25a37492865d inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a8ff7dc071f3a1a6ae2ac25a37492865d">InsertFirstChild</a> (<a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> *addThis)</td></tr> 231<tr class="separator:a8ff7dc071f3a1a6ae2ac25a37492865d inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 232<tr class="memitem:a85adb8f0b7477eec30f9a41d420b09c2 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a85adb8f0b7477eec30f9a41d420b09c2">InsertAfterChild</a> (<a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> *afterThis, <a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> *addThis)</td></tr> 233<tr class="separator:a85adb8f0b7477eec30f9a41d420b09c2 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 234<tr class="memitem:a0360085cc54df5bff85d5c5da13afdce inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a0360085cc54df5bff85d5c5da13afdce">DeleteChildren</a> ()</td></tr> 235<tr class="separator:a0360085cc54df5bff85d5c5da13afdce inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 236<tr class="memitem:a363b6edbd6ebd55f8387d2b89f2b0921 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a363b6edbd6ebd55f8387d2b89f2b0921">DeleteChild</a> (<a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> *node)</td></tr> 237<tr class="separator:a363b6edbd6ebd55f8387d2b89f2b0921 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 238<tr class="memitem:a62c71b6bf8734b5424063b8d9a61c266 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a62c71b6bf8734b5424063b8d9a61c266">DeepClone</a> (<a class="el" href="classtinyxml2_1_1_x_m_l_document.html">XMLDocument</a> *target) const</td></tr> 239<tr class="separator:a62c71b6bf8734b5424063b8d9a61c266 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 240<tr class="memitem:a002978fc889cc011d143185f2377eca2 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a002978fc889cc011d143185f2377eca2">SetUserData</a> (void *userData)</td></tr> 241<tr class="separator:a002978fc889cc011d143185f2377eca2 inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 242<tr class="memitem:a7f0687574afa03bc479dc44f29db0afe inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a7f0687574afa03bc479dc44f29db0afe">GetUserData</a> () const</td></tr> 243<tr class="separator:a7f0687574afa03bc479dc44f29db0afe inherit pub_methods_classtinyxml2_1_1_x_m_l_node"><td class="memSeparator" colspan="2"> </td></tr> 244</table> 245<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> 246<div class="textblock"><p>A Document binds together all the functionality. It can be saved, loaded, and printed to the screen. All Nodes are connected and allocated to a Document. If the Document is deleted, all its Nodes are also deleted. </p> 247</div><h2 class="groupheader">Member Function Documentation</h2> 248<a id="a9efa54f7ecb37c17ab1fa2b3078ccca1"></a> 249<h2 class="memtitle"><span class="permalink"><a href="#a9efa54f7ecb37c17ab1fa2b3078ccca1">◆ </a></span>Accept()</h2> 250 251<div class="memitem"> 252<div class="memproto"> 253<table class="mlabels"> 254 <tr> 255 <td class="mlabels-left"> 256 <table class="memname"> 257 <tr> 258 <td class="memname">virtual bool tinyxml2::XMLDocument::Accept </td> 259 <td>(</td> 260 <td class="paramtype"><a class="el" href="classtinyxml2_1_1_x_m_l_visitor.html">XMLVisitor</a> * </td> 261 <td class="paramname"><em>visitor</em></td><td>)</td> 262 <td> const</td> 263 </tr> 264 </table> 265 </td> 266 <td class="mlabels-right"> 267<span class="mlabels"><span class="mlabel">virtual</span></span> </td> 268 </tr> 269</table> 270</div><div class="memdoc"> 271<p>Accept a hierarchical visit of the nodes in the TinyXML-2 DOM. Every node in the XML tree will be conditionally visited and the host will be called back via the <a class="el" href="classtinyxml2_1_1_x_m_l_visitor.html">XMLVisitor</a> interface.</p> 272<p>This is essentially a SAX interface for TinyXML-2. (Note however it doesn't re-parse the XML for the callbacks, so the performance of TinyXML-2 is unchanged by using this interface versus any other.)</p> 273<p>The interface has been based on ideas from:</p> 274<ul> 275<li><a href="http://www.saxproject.org/">http://www.saxproject.org/</a></li> 276<li><a href="http://c2.com/cgi/wiki?HierarchicalVisitorPattern">http://c2.com/cgi/wiki?HierarchicalVisitorPattern</a></li> 277</ul> 278<p>Which are both good references for "visiting".</p> 279<p>An example of using <a class="el" href="classtinyxml2_1_1_x_m_l_document.html#a9efa54f7ecb37c17ab1fa2b3078ccca1">Accept()</a>: </p><pre class="fragment">XMLPrinter printer; 280tinyxmlDoc.Accept( &printer ); 281const char* xmlcstr = printer.CStr(); 282</pre> 283<p>Implements <a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a81e66df0a44c67a7af17f3b77a152785">tinyxml2::XMLNode</a>.</p> 284 285</div> 286</div> 287<a id="af592ffc91514e25a39664521ac83db45"></a> 288<h2 class="memtitle"><span class="permalink"><a href="#af592ffc91514e25a39664521ac83db45">◆ </a></span>DeepCopy()</h2> 289 290<div class="memitem"> 291<div class="memproto"> 292 <table class="memname"> 293 <tr> 294 <td class="memname">void tinyxml2::XMLDocument::DeepCopy </td> 295 <td>(</td> 296 <td class="paramtype"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html">XMLDocument</a> * </td> 297 <td class="paramname"><em>target</em></td><td>)</td> 298 <td> const</td> 299 </tr> 300 </table> 301</div><div class="memdoc"> 302<p>Copies this document to a target document. The target will be completely cleared before the copy. If you want to copy a sub-tree, see <a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a62c71b6bf8734b5424063b8d9a61c266">XMLNode::DeepClone()</a>.</p> 303<p>NOTE: that the 'target' must be non-null. </p> 304 305</div> 306</div> 307<a id="ac1d6e2c7fcc1a660624ac4f68e96380d"></a> 308<h2 class="memtitle"><span class="permalink"><a href="#ac1d6e2c7fcc1a660624ac4f68e96380d">◆ </a></span>DeleteNode()</h2> 309 310<div class="memitem"> 311<div class="memproto"> 312 <table class="memname"> 313 <tr> 314 <td class="memname">void tinyxml2::XMLDocument::DeleteNode </td> 315 <td>(</td> 316 <td class="paramtype"><a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> * </td> 317 <td class="paramname"><em>node</em></td><td>)</td> 318 <td></td> 319 </tr> 320 </table> 321</div><div class="memdoc"> 322<p>Delete a node associated with this document. It will be unlinked from the DOM. </p> 323 324</div> 325</div> 326<a id="ad75aa9d32c4e8b300655186808aa9abf"></a> 327<h2 class="memtitle"><span class="permalink"><a href="#ad75aa9d32c4e8b300655186808aa9abf">◆ </a></span>ErrorStr()</h2> 328 329<div class="memitem"> 330<div class="memproto"> 331 <table class="memname"> 332 <tr> 333 <td class="memname">const char* tinyxml2::XMLDocument::ErrorStr </td> 334 <td>(</td> 335 <td class="paramname"></td><td>)</td> 336 <td> const</td> 337 </tr> 338 </table> 339</div><div class="memdoc"> 340<p>Returns a "long form" error description. A hopefully helpful diagnostic with location, line number, and/or additional info. </p> 341 342</div> 343</div> 344<a id="a33fc5d159db873a179fa26338adb05bd"></a> 345<h2 class="memtitle"><span class="permalink"><a href="#a33fc5d159db873a179fa26338adb05bd">◆ </a></span>HasBOM()</h2> 346 347<div class="memitem"> 348<div class="memproto"> 349<table class="mlabels"> 350 <tr> 351 <td class="mlabels-left"> 352 <table class="memname"> 353 <tr> 354 <td class="memname">bool tinyxml2::XMLDocument::HasBOM </td> 355 <td>(</td> 356 <td class="paramname"></td><td>)</td> 357 <td> const</td> 358 </tr> 359 </table> 360 </td> 361 <td class="mlabels-right"> 362<span class="mlabels"><span class="mlabel">inline</span></span> </td> 363 </tr> 364</table> 365</div><div class="memdoc"> 366<p>Returns true if this document has a leading Byte Order Mark of UTF8. </p> 367 368</div> 369</div> 370<a id="a2ebd4647a8af5fc6831b294ac26a150a"></a> 371<h2 class="memtitle"><span class="permalink"><a href="#a2ebd4647a8af5fc6831b294ac26a150a">◆ </a></span>LoadFile() <span class="overload">[1/2]</span></h2> 372 373<div class="memitem"> 374<div class="memproto"> 375 <table class="memname"> 376 <tr> 377 <td class="memname">XMLError tinyxml2::XMLDocument::LoadFile </td> 378 <td>(</td> 379 <td class="paramtype">const char * </td> 380 <td class="paramname"><em>filename</em></td><td>)</td> 381 <td></td> 382 </tr> 383 </table> 384</div><div class="memdoc"> 385<p>Load an XML file from disk. Returns XML_SUCCESS (0) on success, or an errorID. </p> 386 387</div> 388</div> 389<a id="a5f1d330fad44c52f3d265338dd2a6dc2"></a> 390<h2 class="memtitle"><span class="permalink"><a href="#a5f1d330fad44c52f3d265338dd2a6dc2">◆ </a></span>LoadFile() <span class="overload">[2/2]</span></h2> 391 392<div class="memitem"> 393<div class="memproto"> 394 <table class="memname"> 395 <tr> 396 <td class="memname">XMLError tinyxml2::XMLDocument::LoadFile </td> 397 <td>(</td> 398 <td class="paramtype">FILE * </td> 399 <td class="paramname"></td><td>)</td> 400 <td></td> 401 </tr> 402 </table> 403</div><div class="memdoc"> 404<p>Load an XML file from disk. You are responsible for providing and closing the FILE*.</p> 405<p>NOTE: The file should be opened as binary ("rb") not text in order for TinyXML-2 to correctly do newline normalization.</p> 406<p>Returns XML_SUCCESS (0) on success, or an errorID. </p> 407 408</div> 409</div> 410<a id="ade4874bcb439954972ef2b3723ff3259"></a> 411<h2 class="memtitle"><span class="permalink"><a href="#ade4874bcb439954972ef2b3723ff3259">◆ </a></span>NewComment()</h2> 412 413<div class="memitem"> 414<div class="memproto"> 415 <table class="memname"> 416 <tr> 417 <td class="memname"><a class="el" href="classtinyxml2_1_1_x_m_l_comment.html">XMLComment</a>* tinyxml2::XMLDocument::NewComment </td> 418 <td>(</td> 419 <td class="paramtype">const char * </td> 420 <td class="paramname"><em>comment</em></td><td>)</td> 421 <td></td> 422 </tr> 423 </table> 424</div><div class="memdoc"> 425<p>Create a new Comment associated with this Document. The memory for the Comment is managed by the Document. </p> 426 427</div> 428</div> 429<a id="aee2eb3435923f5494dcc70ac225b60a2"></a> 430<h2 class="memtitle"><span class="permalink"><a href="#aee2eb3435923f5494dcc70ac225b60a2">◆ </a></span>NewDeclaration()</h2> 431 432<div class="memitem"> 433<div class="memproto"> 434 <table class="memname"> 435 <tr> 436 <td class="memname"><a class="el" href="classtinyxml2_1_1_x_m_l_declaration.html">XMLDeclaration</a>* tinyxml2::XMLDocument::NewDeclaration </td> 437 <td>(</td> 438 <td class="paramtype">const char * </td> 439 <td class="paramname"><em>text</em> = <code>0</code></td><td>)</td> 440 <td></td> 441 </tr> 442 </table> 443</div><div class="memdoc"> 444<p>Create a new Declaration associated with this Document. The memory for the object is managed by the Document.</p> 445<p>If the 'text' param is null, the standard declaration is used.: </p><pre class="fragment"> <?xml version="1.0" encoding="UTF-8"?> 446</pre> 447</div> 448</div> 449<a id="a8aa7817d4a1001364b06373763ab99d6"></a> 450<h2 class="memtitle"><span class="permalink"><a href="#a8aa7817d4a1001364b06373763ab99d6">◆ </a></span>NewElement()</h2> 451 452<div class="memitem"> 453<div class="memproto"> 454 <table class="memname"> 455 <tr> 456 <td class="memname"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">XMLElement</a>* tinyxml2::XMLDocument::NewElement </td> 457 <td>(</td> 458 <td class="paramtype">const char * </td> 459 <td class="paramname"><em>name</em></td><td>)</td> 460 <td></td> 461 </tr> 462 </table> 463</div><div class="memdoc"> 464<p>Create a new Element associated with this Document. The memory for the Element is managed by the Document. </p> 465 466</div> 467</div> 468<a id="ab7e8b29ae4099092a8bb947da6361296"></a> 469<h2 class="memtitle"><span class="permalink"><a href="#ab7e8b29ae4099092a8bb947da6361296">◆ </a></span>NewText()</h2> 470 471<div class="memitem"> 472<div class="memproto"> 473 <table class="memname"> 474 <tr> 475 <td class="memname"><a class="el" href="classtinyxml2_1_1_x_m_l_text.html">XMLText</a>* tinyxml2::XMLDocument::NewText </td> 476 <td>(</td> 477 <td class="paramtype">const char * </td> 478 <td class="paramname"><em>text</em></td><td>)</td> 479 <td></td> 480 </tr> 481 </table> 482</div><div class="memdoc"> 483<p>Create a new Text associated with this Document. The memory for the Text is managed by the Document. </p> 484 485</div> 486</div> 487<a id="a5385c937734ff6db9226ab707d2c7147"></a> 488<h2 class="memtitle"><span class="permalink"><a href="#a5385c937734ff6db9226ab707d2c7147">◆ </a></span>NewUnknown()</h2> 489 490<div class="memitem"> 491<div class="memproto"> 492 <table class="memname"> 493 <tr> 494 <td class="memname"><a class="el" href="classtinyxml2_1_1_x_m_l_unknown.html">XMLUnknown</a>* tinyxml2::XMLDocument::NewUnknown </td> 495 <td>(</td> 496 <td class="paramtype">const char * </td> 497 <td class="paramname"><em>text</em></td><td>)</td> 498 <td></td> 499 </tr> 500 </table> 501</div><div class="memdoc"> 502<p>Create a new Unknown associated with this Document. The memory for the object is managed by the Document. </p> 503 504</div> 505</div> 506<a id="a1819bd34f540a7304c105a6232d25a1f"></a> 507<h2 class="memtitle"><span class="permalink"><a href="#a1819bd34f540a7304c105a6232d25a1f">◆ </a></span>Parse()</h2> 508 509<div class="memitem"> 510<div class="memproto"> 511 <table class="memname"> 512 <tr> 513 <td class="memname">XMLError tinyxml2::XMLDocument::Parse </td> 514 <td>(</td> 515 <td class="paramtype">const char * </td> 516 <td class="paramname"><em>xml</em>, </td> 517 </tr> 518 <tr> 519 <td class="paramkey"></td> 520 <td></td> 521 <td class="paramtype">size_t </td> 522 <td class="paramname"><em>nBytes</em> = <code>(size_t)(-1)</code> </td> 523 </tr> 524 <tr> 525 <td></td> 526 <td>)</td> 527 <td></td><td></td> 528 </tr> 529 </table> 530</div><div class="memdoc"> 531<p>Parse an XML file from a character string. Returns XML_SUCCESS (0) on success, or an errorID.</p> 532<p>You may optionally pass in the 'nBytes', which is the number of bytes which will be parsed. If not specified, TinyXML-2 will assume 'xml' points to a null terminated string. </p> 533 534</div> 535</div> 536<a id="a867cf5fa3e3ff6ae4847a8b7ee8ec083"></a> 537<h2 class="memtitle"><span class="permalink"><a href="#a867cf5fa3e3ff6ae4847a8b7ee8ec083">◆ </a></span>Print()</h2> 538 539<div class="memitem"> 540<div class="memproto"> 541 <table class="memname"> 542 <tr> 543 <td class="memname">void tinyxml2::XMLDocument::Print </td> 544 <td>(</td> 545 <td class="paramtype"><a class="el" href="classtinyxml2_1_1_x_m_l_printer.html">XMLPrinter</a> * </td> 546 <td class="paramname"><em>streamer</em> = <code>0</code></td><td>)</td> 547 <td> const</td> 548 </tr> 549 </table> 550</div><div class="memdoc"> 551<p>Print the Document. If the Printer is not provided, it will print to stdout. If you provide Printer, this can print to a file: </p><pre class="fragment">XMLPrinter printer( fp ); 552doc.Print( &printer ); 553</pre><p>Or you can use a printer to print to memory: </p><pre class="fragment">XMLPrinter printer; 554doc.Print( &printer ); 555// printer.CStr() has a const char* to the XML 556</pre> 557</div> 558</div> 559<a id="ad2b70320d3c2a071c2f36928edff3e1c"></a> 560<h2 class="memtitle"><span class="permalink"><a href="#ad2b70320d3c2a071c2f36928edff3e1c">◆ </a></span>RootElement()</h2> 561 562<div class="memitem"> 563<div class="memproto"> 564<table class="mlabels"> 565 <tr> 566 <td class="mlabels-left"> 567 <table class="memname"> 568 <tr> 569 <td class="memname"><a class="el" href="classtinyxml2_1_1_x_m_l_element.html">XMLElement</a>* tinyxml2::XMLDocument::RootElement </td> 570 <td>(</td> 571 <td class="paramname"></td><td>)</td> 572 <td></td> 573 </tr> 574 </table> 575 </td> 576 <td class="mlabels-right"> 577<span class="mlabels"><span class="mlabel">inline</span></span> </td> 578 </tr> 579</table> 580</div><div class="memdoc"> 581<p>Return the root element of DOM. Equivalent to <a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a1795a35852dc8aae877cc8ded986e59b">FirstChildElement()</a>. To get the first node, use FirstChild(). </p> 582 583</div> 584</div> 585<a id="a73ac416b4a2aa0952e841220eb3da18f"></a> 586<h2 class="memtitle"><span class="permalink"><a href="#a73ac416b4a2aa0952e841220eb3da18f">◆ </a></span>SaveFile() <span class="overload">[1/2]</span></h2> 587 588<div class="memitem"> 589<div class="memproto"> 590 <table class="memname"> 591 <tr> 592 <td class="memname">XMLError tinyxml2::XMLDocument::SaveFile </td> 593 <td>(</td> 594 <td class="paramtype">const char * </td> 595 <td class="paramname"><em>filename</em>, </td> 596 </tr> 597 <tr> 598 <td class="paramkey"></td> 599 <td></td> 600 <td class="paramtype">bool </td> 601 <td class="paramname"><em>compact</em> = <code>false</code> </td> 602 </tr> 603 <tr> 604 <td></td> 605 <td>)</td> 606 <td></td><td></td> 607 </tr> 608 </table> 609</div><div class="memdoc"> 610<p>Save the XML file to disk. Returns XML_SUCCESS (0) on success, or an errorID. </p> 611 612</div> 613</div> 614<a id="a8b95779479a0035acc67b3a61dfe1b74"></a> 615<h2 class="memtitle"><span class="permalink"><a href="#a8b95779479a0035acc67b3a61dfe1b74">◆ </a></span>SaveFile() <span class="overload">[2/2]</span></h2> 616 617<div class="memitem"> 618<div class="memproto"> 619 <table class="memname"> 620 <tr> 621 <td class="memname">XMLError tinyxml2::XMLDocument::SaveFile </td> 622 <td>(</td> 623 <td class="paramtype">FILE * </td> 624 <td class="paramname"><em>fp</em>, </td> 625 </tr> 626 <tr> 627 <td class="paramkey"></td> 628 <td></td> 629 <td class="paramtype">bool </td> 630 <td class="paramname"><em>compact</em> = <code>false</code> </td> 631 </tr> 632 <tr> 633 <td></td> 634 <td>)</td> 635 <td></td><td></td> 636 </tr> 637 </table> 638</div><div class="memdoc"> 639<p>Save the XML file to disk. You are responsible for providing and closing the FILE*.</p> 640<p>Returns XML_SUCCESS (0) on success, or an errorID. </p> 641 642</div> 643</div> 644<a id="a14419b698f7c4b140df4e80f3f0c93b0"></a> 645<h2 class="memtitle"><span class="permalink"><a href="#a14419b698f7c4b140df4e80f3f0c93b0">◆ </a></span>SetBOM()</h2> 646 647<div class="memitem"> 648<div class="memproto"> 649<table class="mlabels"> 650 <tr> 651 <td class="mlabels-left"> 652 <table class="memname"> 653 <tr> 654 <td class="memname">void tinyxml2::XMLDocument::SetBOM </td> 655 <td>(</td> 656 <td class="paramtype">bool </td> 657 <td class="paramname"><em>useBOM</em></td><td>)</td> 658 <td></td> 659 </tr> 660 </table> 661 </td> 662 <td class="mlabels-right"> 663<span class="mlabels"><span class="mlabel">inline</span></span> </td> 664 </tr> 665</table> 666</div><div class="memdoc"> 667<p>Sets whether to write the BOM when writing the file. </p> 668 669</div> 670</div> 671<a id="aa37cc1709d7e1e988bc17dcfb24a69b8"></a> 672<h2 class="memtitle"><span class="permalink"><a href="#aa37cc1709d7e1e988bc17dcfb24a69b8">◆ </a></span>ShallowClone()</h2> 673 674<div class="memitem"> 675<div class="memproto"> 676<table class="mlabels"> 677 <tr> 678 <td class="mlabels-left"> 679 <table class="memname"> 680 <tr> 681 <td class="memname">virtual <a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a>* tinyxml2::XMLDocument::ShallowClone </td> 682 <td>(</td> 683 <td class="paramtype"><a class="el" href="classtinyxml2_1_1_x_m_l_document.html">XMLDocument</a> * </td> 684 <td class="paramname"><em>document</em></td><td>)</td> 685 <td> const</td> 686 </tr> 687 </table> 688 </td> 689 <td class="mlabels-right"> 690<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td> 691 </tr> 692</table> 693</div><div class="memdoc"> 694<p>Make a copy of this node, but not its children. You may pass in a Document pointer that will be the owner of the new Node. If the 'document' is null, then the node returned will be allocated from the current Document. (this-><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#af343d1ef0b45c0020e62d784d7e67a68" title="Get the XMLDocument that owns this XMLNode. ">GetDocument()</a>)</p> 695<p>Note: if called on a <a class="el" href="classtinyxml2_1_1_x_m_l_document.html">XMLDocument</a>, this will return null. </p> 696 697<p>Implements <a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a8402cbd3129d20e9e6024bbcc0531283">tinyxml2::XMLNode</a>.</p> 698 699</div> 700</div> 701<a id="a6fe5ef18699091844fcf64b56ffa5bf9"></a> 702<h2 class="memtitle"><span class="permalink"><a href="#a6fe5ef18699091844fcf64b56ffa5bf9">◆ </a></span>ShallowEqual()</h2> 703 704<div class="memitem"> 705<div class="memproto"> 706<table class="mlabels"> 707 <tr> 708 <td class="mlabels-left"> 709 <table class="memname"> 710 <tr> 711 <td class="memname">virtual bool tinyxml2::XMLDocument::ShallowEqual </td> 712 <td>(</td> 713 <td class="paramtype">const <a class="el" href="classtinyxml2_1_1_x_m_l_node.html">XMLNode</a> * </td> 714 <td class="paramname"><em>compare</em></td><td>)</td> 715 <td> const</td> 716 </tr> 717 </table> 718 </td> 719 <td class="mlabels-right"> 720<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td> 721 </tr> 722</table> 723</div><div class="memdoc"> 724<p>Test if 2 nodes are the same, but don't test children. The 2 nodes do not need to be in the same Document.</p> 725<p>Note: if called on a <a class="el" href="classtinyxml2_1_1_x_m_l_document.html">XMLDocument</a>, this will return false. </p> 726 727<p>Implements <a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a7ce18b751c3ea09eac292dca264f9226">tinyxml2::XMLNode</a>.</p> 728 729</div> 730</div> 731<hr/>The documentation for this class was generated from the following file:<ul> 732<li><a class="el" href="tinyxml2_8h_source.html">tinyxml2.h</a></li> 733</ul> 734</div><!-- contents --> 735<!-- start footer part --> 736<hr class="footer"/><address class="footer"><small> 737Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by  <a href="http://www.doxygen.org/index.html"> 738<img class="footer" src="doxygen.png" alt="doxygen"/> 739</a> 1.8.13 740</small></address> 741</body> 742</html> 743