📄 classtixmldocument.html
字号:
</table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Returns the location (if known) of the error.<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 compact><dt><b>See also: </b></dt><dd><a class="el" href="classTiXmlDocument.html#a19">SetTabSize</a>, <a class="el" href="classTiXmlBase.html#a3">Row</a>, <a class="el" href="classTiXmlBase.html#a4">Column</a> </dl> </td> </tr></table><a name="a10" doxytag="TiXmlDocument::LoadFile"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> bool TiXmlDocument::LoadFile </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const std::string & </td> <td class="mdname" nowrap> <em>filename</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>TiXmlEncoding </td> <td class="mdname" nowrap> <em>encoding</em> = TIXML_DEFAULT_ENCODING</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>encoding</em> </td><td>STL std::string version. </td></tr></table></dl> </td> </tr></table><a name="a6" doxytag="TiXmlDocument::LoadFile"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> bool TiXmlDocument::LoadFile </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">TiXmlEncoding </td> <td class="mdname1" valign="top" nowrap> <em>encoding</em> = TIXML_DEFAULT_ENCODING </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Load a file using the current document value.<p>Returns true if successful. Will delete any existing document data before loading. </td> </tr></table><a name="a12" doxytag="TiXmlDocument::Parse"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual const char* TiXmlDocument::Parse </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname" nowrap> <em>p</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>TiXmlParsingData * </td> <td class="mdname" nowrap> <em>data</em> = 0, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>TiXmlEncoding </td> <td class="mdname" nowrap> <em>encoding</em> = TIXML_DEFAULT_ENCODING</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Parse the given null terminated block of xml data.<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>Implements <a class="el" href="classTiXmlBase.html">TiXmlBase</a>. </td> </tr></table><a name="a13" doxytag="TiXmlDocument::RootElement"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="classTiXmlElement.html">TiXmlElement</a>* TiXmlDocument::RootElement </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get the root element -- the only top level element -- of the document.<p>In well formed XML, there should only be one. TinyXml is tolerant of multiple elements at the document level. </td> </tr></table><a name="a19" doxytag="TiXmlDocument::SetTabSize"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void TiXmlDocument::SetTabSize </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">int </td> <td class="mdname1" valign="top" nowrap> <em>_tabsize</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><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.<p>Very useful for tracking the DOM back in to the source file.<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>Note that row and column tracking is not supported when using operator>>.<p>The tab size needs to be enabled before the parse or load. Correct usage: <div class="fragment"><pre> TiXmlDocument doc; doc.SetTabSize( 8 ); doc.Load( "myfile.xml" ); </pre></div><p><dl compact><dt><b>See also: </b></dt><dd><a class="el" href="classTiXmlBase.html#a3">Row</a>, <a class="el" href="classTiXmlBase.html#a4">Column</a> </dl> </td> </tr></table><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></ul><hr><address style="align: right;"><small>Generated on Sun Aug 1 12:06:34 2004 for TinyXml by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -