mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-27 06:02:32 +00:00
437 lines
30 KiB
HTML
437 lines
30 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<title>TinyXml: TiXmlDocument Class Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<!-- Generated by Doxygen 1.6.2 -->
|
|
<div class="navigation" id="top">
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="contents">
|
|
<h1>TiXmlDocument Class Reference</h1><!-- doxytag: class="TiXmlDocument" --><!-- doxytag: inherits="TiXmlNode" -->
|
|
<p>Always the top level node.
|
|
<a href="#_details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="tinyxml_8h_source.html">tinyxml.h</a>></code></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for TiXmlDocument:</div>
|
|
<div class="dynsection">
|
|
<div class="center">
|
|
<img src="classTiXmlDocument.png" usemap="#TiXmlDocument_map" alt=""/>
|
|
<map id="TiXmlDocument_map" name="TiXmlDocument_map">
|
|
<area href="classTiXmlNode.html" alt="TiXmlNode" shape="rect" coords="0,56,99,80"/>
|
|
<area href="classTiXmlBase.html" alt="TiXmlBase" shape="rect" coords="0,0,99,24"/>
|
|
</map>
|
|
</div>
|
|
</div>
|
|
|
|
<p><a href="classTiXmlDocument-members.html">List of all members.</a></p>
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9f5e84335708fde98400230f9f12659c"></a><!-- doxytag: member="TiXmlDocument::TiXmlDocument" ref="a9f5e84335708fde98400230f9f12659c" args="()" -->
|
|
</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a9f5e84335708fde98400230f9f12659c">TiXmlDocument</a> ()</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create an empty document, that has no name. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae4508b452d0c3061db085f3db27b8396"></a><!-- doxytag: member="TiXmlDocument::TiXmlDocument" ref="ae4508b452d0c3061db085f3db27b8396" args="(const char *documentName)" -->
|
|
</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#ae4508b452d0c3061db085f3db27b8396">TiXmlDocument</a> (const char *documentName)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a document with a name. The name of the document is also the filename of the xml. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c6e58fb99bfa76cc613f16840022225"></a><!-- doxytag: member="TiXmlDocument::TiXmlDocument" ref="a2c6e58fb99bfa76cc613f16840022225" args="(const std::string &documentName)" -->
|
|
</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a2c6e58fb99bfa76cc613f16840022225">TiXmlDocument</a> (const std::string &documentName)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f">LoadFile</a> (TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Load a file using the current document value. <a href="#a4c852a889c02cf251117fd1d9fe1845f"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a21c0aeb0d0a720169ad4ac89523ebe93"></a><!-- doxytag: member="TiXmlDocument::SaveFile" ref="a21c0aeb0d0a720169ad4ac89523ebe93" args="() const " -->
|
|
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93">SaveFile</a> () const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Save a file using the current document value. Returns true if successful. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a879cdf5e981b8b2d2ef82f2546dd28fb"></a><!-- doxytag: member="TiXmlDocument::LoadFile" ref="a879cdf5e981b8b2d2ef82f2546dd28fb" args="(const char *filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)" -->
|
|
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a879cdf5e981b8b2d2ef82f2546dd28fb">LoadFile</a> (const char *filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Load a file using the given filename. Returns true if successful. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae869f5ebf7fc54c4a1d737fb4689fd44"></a><!-- doxytag: member="TiXmlDocument::SaveFile" ref="ae869f5ebf7fc54c4a1d737fb4689fd44" args="(const char *filename) const " -->
|
|
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#ae869f5ebf7fc54c4a1d737fb4689fd44">SaveFile</a> (const char *filename) const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Save a file using the given filename. Returns true if successful. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a41f6fe7200864d1dca663d230caf8db6">LoadFile</a> (FILE *, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Load a file using the given FILE*. <a href="#a41f6fe7200864d1dca663d230caf8db6"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acf1672b4538c6d1d441f9f108aea2bf4"></a><!-- doxytag: member="TiXmlDocument::SaveFile" ref="acf1672b4538c6d1d441f9f108aea2bf4" args="(FILE *) const " -->
|
|
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#acf1672b4538c6d1d441f9f108aea2bf4">SaveFile</a> (FILE *) const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Save a file using the given FILE*. Returns true if successful. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a18ae6ed34fed7991ebc220862dfac884">LoadFile</a> (const std::string &filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3d4fae0463f3f03679ba0b7cf6f2df52"></a><!-- doxytag: member="TiXmlDocument::SaveFile" ref="a3d4fae0463f3f03679ba0b7cf6f2df52" args="(const std::string &filename) const " -->
|
|
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a3d4fae0463f3f03679ba0b7cf6f2df52">SaveFile</a> (const std::string &filename) const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">< STL std::string version. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a17ebabe36926ef398e78dec0d0ad0378">Parse</a> (const char *p, TiXmlParsingData *data=0, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Parse the given null terminated block of xml data. <a href="#a17ebabe36926ef398e78dec0d0ad0378"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classTiXmlElement.html">TiXmlElement</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#ad09d17927f908f40efb406af2fb873be">RootElement</a> () const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the root element -- the only top level element -- of the document. <a href="#ad09d17927f908f40efb406af2fb873be"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a6dfc01a6e5d58e56acd537dfd3bdeb29">Error</a> () const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">If an error occurs, Error will be set to true. <a href="#a6dfc01a6e5d58e56acd537dfd3bdeb29"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9d0f689f6e09ea494ea547be8d79c25e"></a><!-- doxytag: member="TiXmlDocument::ErrorDesc" ref="a9d0f689f6e09ea494ea547be8d79c25e" args="() const " -->
|
|
const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a9d0f689f6e09ea494ea547be8d79c25e">ErrorDesc</a> () const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Contains a textual (english) description of the error if one occurs. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#af96fc2f3f9ec6422782bfe916c9e778f">ErrorId</a> () const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Generally, you probably want the error string ( <a class="el" href="classTiXmlDocument.html#a9d0f689f6e09ea494ea547be8d79c25e" title="Contains a textual (english) description of the error if one occurs.">ErrorDesc()</a> ). <a href="#af96fc2f3f9ec6422782bfe916c9e778f"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e">ErrorRow</a> () const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the location (if known) of the error. <a href="#af30efc75e804aa2e92fb8be3a8cb676e"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa90bc630ee5203c6109ca5fad3323649"></a><!-- doxytag: member="TiXmlDocument::ErrorCol" ref="aa90bc630ee5203c6109ca5fad3323649" args="() const " -->
|
|
int </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#aa90bc630ee5203c6109ca5fad3323649">ErrorCol</a> () const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">The column where the error occured. See <a class="el" href="classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e" title="Returns the location (if known) of the error.">ErrorRow()</a>. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e">SetTabSize</a> (int _tabsize)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e" title="SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) to...">SetTabSize()</a> allows the error reporting functions (<a class="el" href="classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e" title="Returns the location (if known) of the error.">ErrorRow()</a> and <a class="el" href="classTiXmlDocument.html#aa90bc630ee5203c6109ca5fad3323649" title="The column where the error occured. See ErrorRow().">ErrorCol()</a>) to report the correct values for row and column. <a href="#a51dac56316f89b35bdb7d0d433ba988e"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#ac66b8c28db86363315712a3574e87c35">ClearError</a> ()</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">If you have handled the error, it can be reset with this call. <a href="#ac66b8c28db86363315712a3574e87c35"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510">Print</a> () const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Write the document to standard out using formatted printing ("pretty print"). <a href="#af08389ec70ee9b2de7f800e206a18510"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8701fda1fa31b25abbc9c0df42da10e8"></a><!-- doxytag: member="TiXmlDocument::Print" ref="a8701fda1fa31b25abbc9c0df42da10e8" args="(FILE *cfile, int depth=0) const " -->
|
|
virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a8701fda1fa31b25abbc9c0df42da10e8">Print</a> (FILE *cfile, int depth=0) const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Print this Document to a FILE stream. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1dc977bde3e4fe85a8eb9d88a35ef5a4"></a><!-- doxytag: member="TiXmlDocument::ToDocument" ref="a1dc977bde3e4fe85a8eb9d88a35ef5a4" args="() const " -->
|
|
virtual const <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a1dc977bde3e4fe85a8eb9d88a35ef5a4">ToDocument</a> () const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1025d942a1f328fd742d545e37efdd42"></a><!-- doxytag: member="TiXmlDocument::ToDocument" ref="a1025d942a1f328fd742d545e37efdd42" args="()" -->
|
|
virtual <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a1025d942a1f328fd742d545e37efdd42">ToDocument</a> ()</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa545aae325d9752ad64120bc4ecf939a"></a><!-- doxytag: member="TiXmlDocument::Accept" ref="aa545aae325d9752ad64120bc4ecf939a" args="(TiXmlVisitor *content) const " -->
|
|
virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#aa545aae325d9752ad64120bc4ecf939a">Accept</a> (<a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a> *content) const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Walk the XML tree visiting this node and all of its children. <br/></td></tr>
|
|
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classTiXmlNode.html">TiXmlNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a4968661cab4a1f44a23329c6f8db1907">Clone</a> () const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create an exact duplicate of this node and return it. <a href="#a4968661cab4a1f44a23329c6f8db1907"></a><br/></td></tr>
|
|
</table>
|
|
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
|
<p>Always the top level node. </p>
|
|
<p>A document binds together all the XML pieces. It can be saved, loaded, and printed to the screen. The 'value' of a document node is the xml file name. </p>
|
|
<hr/><h2>Member Function Documentation</h2>
|
|
<a class="anchor" id="ac66b8c28db86363315712a3574e87c35"></a><!-- doxytag: member="TiXmlDocument::ClearError" ref="ac66b8c28db86363315712a3574e87c35" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void TiXmlDocument::ClearError </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td><code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>If you have handled the error, it can be reset with this call. </p>
|
|
<p>The error state is automatically cleared if you Parse a new XML block. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a4968661cab4a1f44a23329c6f8db1907"></a><!-- doxytag: member="TiXmlDocument::Clone" ref="a4968661cab4a1f44a23329c6f8db1907" args="() const " -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual <a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlDocument::Clone </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td> const<code> [protected, virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Create an exact duplicate of this node and return it. </p>
|
|
<p>The memory must be deleted by the caller. </p>
|
|
|
|
<p>Implements <a class="el" href="classTiXmlNode.html#a4508cc3a2d7a98e96a54cc09c37a78a4">TiXmlNode</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a6dfc01a6e5d58e56acd537dfd3bdeb29"></a><!-- doxytag: member="TiXmlDocument::Error" ref="a6dfc01a6e5d58e56acd537dfd3bdeb29" args="() const " -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool TiXmlDocument::Error </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td> const<code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>If an error occurs, Error will be set to true. </p>
|
|
<p>Also,</p>
|
|
<ul>
|
|
<li>The <a class="el" href="classTiXmlDocument.html#af96fc2f3f9ec6422782bfe916c9e778f" title="Generally, you probably want the error string ( ErrorDesc() ).">ErrorId()</a> will contain the integer identifier of the error (not generally useful)</li>
|
|
<li>The <a class="el" href="classTiXmlDocument.html#a9d0f689f6e09ea494ea547be8d79c25e" title="Contains a textual (english) description of the error if one occurs.">ErrorDesc()</a> method will return the name of the error. (very useful)</li>
|
|
<li>The <a class="el" href="classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e" title="Returns the location (if known) of the error.">ErrorRow()</a> and <a class="el" href="classTiXmlDocument.html#aa90bc630ee5203c6109ca5fad3323649" title="The column where the error occured. See ErrorRow().">ErrorCol()</a> will return the location of the error (if known) </li>
|
|
</ul>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="af96fc2f3f9ec6422782bfe916c9e778f"></a><!-- doxytag: member="TiXmlDocument::ErrorId" ref="af96fc2f3f9ec6422782bfe916c9e778f" args="() const " -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int TiXmlDocument::ErrorId </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td> const<code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Generally, you probably want the error string ( <a class="el" href="classTiXmlDocument.html#a9d0f689f6e09ea494ea547be8d79c25e" title="Contains a textual (english) description of the error if one occurs.">ErrorDesc()</a> ). </p>
|
|
<p>But if you prefer the ErrorId, this function will fetch it. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="af30efc75e804aa2e92fb8be3a8cb676e"></a><!-- doxytag: member="TiXmlDocument::ErrorRow" ref="af30efc75e804aa2e92fb8be3a8cb676e" args="() const " -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int TiXmlDocument::ErrorRow </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td> const<code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Returns the location (if known) of the error. </p>
|
|
<p>The first column is column 1, and the first row is row 1. A value of 0 means the row and column wasn't applicable (memory errors, for example, have no row/column) or the parser lost the error. (An error in the error reporting, in that case.)</p>
|
|
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e" title="SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) to...">SetTabSize</a>, <a class="el" href="classTiXmlBase.html#a024bceb070188df92c2a8d8852dd0853" title="Return the position, in the original source file, of this node or attribute.">Row</a>, <a class="el" href="classTiXmlBase.html#ab54bfb9b70fe6dd276e7b279cab7f003" title="See Row().">Column</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a18ae6ed34fed7991ebc220862dfac884"></a><!-- doxytag: member="TiXmlDocument::LoadFile" ref="a18ae6ed34fed7991ebc220862dfac884" args="(const std::string &filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool TiXmlDocument::LoadFile </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const std::string & </td>
|
|
<td class="paramname"> <em>filename</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">TiXmlEncoding </td>
|
|
<td class="paramname"> <em>encoding</em> = <code>TIXML_DEFAULT_ENCODING</code></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td><code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>encoding</em> </td><td>STL std::string version. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>References <a class="el" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f">LoadFile()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a41f6fe7200864d1dca663d230caf8db6"></a><!-- doxytag: member="TiXmlDocument::LoadFile" ref="a41f6fe7200864d1dca663d230caf8db6" args="(FILE *, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool TiXmlDocument::LoadFile </td>
|
|
<td>(</td>
|
|
<td class="paramtype">FILE * </td>
|
|
<td class="paramname">, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">TiXmlEncoding </td>
|
|
<td class="paramname"> <em>encoding</em> = <code>TIXML_DEFAULT_ENCODING</code></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Load a file using the given FILE*. </p>
|
|
<p>Returns true if successful. Note that this method doesn't stream - the entire object pointed at by the FILE* will be interpreted as an XML file. TinyXML doesn't stream in XML from the current file location. Streaming may be added in the future. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a4c852a889c02cf251117fd1d9fe1845f"></a><!-- doxytag: member="TiXmlDocument::LoadFile" ref="a4c852a889c02cf251117fd1d9fe1845f" args="(TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool TiXmlDocument::LoadFile </td>
|
|
<td>(</td>
|
|
<td class="paramtype">TiXmlEncoding </td>
|
|
<td class="paramname"> <em>encoding</em> = <code>TIXML_DEFAULT_ENCODING</code></td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Load a file using the current document value. </p>
|
|
<p>Returns true if successful. Will delete any existing document data before loading. </p>
|
|
|
|
<p>Referenced by <a class="el" href="tinyxml_8h_source.html#l01432">LoadFile()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a17ebabe36926ef398e78dec0d0ad0378"></a><!-- doxytag: member="TiXmlDocument::Parse" ref="a17ebabe36926ef398e78dec0d0ad0378" args="(const char *p, TiXmlParsingData *data=0, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual const char* TiXmlDocument::Parse </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"> <em>p</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">TiXmlParsingData * </td>
|
|
<td class="paramname"> <em>data</em> = <code>0</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">TiXmlEncoding </td>
|
|
<td class="paramname"> <em>encoding</em> = <code>TIXML_DEFAULT_ENCODING</code></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td><code> [virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Parse the given null terminated block of xml data. </p>
|
|
<p>Passing in an encoding to this method (either TIXML_ENCODING_LEGACY or TIXML_ENCODING_UTF8 will force TinyXml to use that encoding, regardless of what TinyXml might otherwise try to detect. </p>
|
|
|
|
<p>Implements <a class="el" href="classTiXmlBase.html">TiXmlBase</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="af08389ec70ee9b2de7f800e206a18510"></a><!-- doxytag: member="TiXmlDocument::Print" ref="af08389ec70ee9b2de7f800e206a18510" args="() const " -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void TiXmlDocument::Print </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td> const<code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Write the document to standard out using formatted printing ("pretty print"). </p>
|
|
|
|
<p>References <a class="el" href="tinyxml_8h_source.html#l01519">Print()</a>.</p>
|
|
|
|
<p>Referenced by <a class="el" href="tinyxml_8h_source.html#l01519">Print()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ad09d17927f908f40efb406af2fb873be"></a><!-- doxytag: member="TiXmlDocument::RootElement" ref="ad09d17927f908f40efb406af2fb873be" args="() const " -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const <a class="el" href="classTiXmlElement.html">TiXmlElement</a>* TiXmlDocument::RootElement </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td> const<code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Get the root element -- the only top level element -- of the document. </p>
|
|
<p>In well formed XML, there should only be one. TinyXml is tolerant of multiple elements at the document level. </p>
|
|
|
|
<p>References <a class="el" href="classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba">TiXmlNode::FirstChildElement()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a51dac56316f89b35bdb7d0d433ba988e"></a><!-- doxytag: member="TiXmlDocument::SetTabSize" ref="a51dac56316f89b35bdb7d0d433ba988e" args="(int _tabsize)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void TiXmlDocument::SetTabSize </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"> <em>_tabsize</em></td>
|
|
<td> ) </td>
|
|
<td><code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p><a class="el" href="classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e" title="SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) to...">SetTabSize()</a> allows the error reporting functions (<a class="el" href="classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e" title="Returns the location (if known) of the error.">ErrorRow()</a> and <a class="el" href="classTiXmlDocument.html#aa90bc630ee5203c6109ca5fad3323649" title="The column where the error occured. See ErrorRow().">ErrorCol()</a>) to report the correct values for row and column. </p>
|
|
<p>It does not change the output or input in any way.</p>
|
|
<p>By calling this method, with a tab size greater than 0, the row and column of each node and attribute is stored when the file is loaded. Very useful for tracking the DOM back in to the source file.</p>
|
|
<p>The tab size is required for calculating the location of nodes. If not set, the default of 4 is used. The tabsize is set per document. Setting the tabsize to 0 disables row/column tracking.</p>
|
|
<p>Note that row and column tracking is not supported when using operator>>.</p>
|
|
<p>The tab size needs to be enabled before the parse or load. Correct usage: </p>
|
|
<div class="fragment"><pre class="fragment">
|
|
TiXmlDocument doc;
|
|
doc.SetTabSize( 8 );
|
|
doc.Load( "myfile.xml" );
|
|
</pre></div><dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classTiXmlBase.html#a024bceb070188df92c2a8d8852dd0853" title="Return the position, in the original source file, of this node or attribute.">Row</a>, <a class="el" href="classTiXmlBase.html#ab54bfb9b70fe6dd276e7b279cab7f003" title="See Row().">Column</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="tinyxml_8h_source.html">tinyxml.h</a></li>
|
|
</ul>
|
|
</div>
|
|
<hr size="1"/><address style="text-align: right;"><small>Generated by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
|
|
</body>
|
|
</html>
|