⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cpl__minixml_8h.html

📁 gdal库的学习文档
💻 HTML
📖 第 1 页 / 共 4 页
字号:
          <td class="paramname"> <em>psRoot</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszElement</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Search for a node in document. <p>Searches the children (and potentially siblings) of the documented passed in for the named element or attribute. To search following siblings as well as children, prefix the pszElement name with an equal sign. This function does an in-order traversal of the document tree. So it will first match against the current node, then it's first child, that childs first child, and so on.<p>Use <a class="el" href="cpl__minixml_8h.html#cb137728b61e42765ea7e5188a24f90e">CPLGetXMLNode()</a> to find a specific child, or along a specific node path.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>psRoot</em>&nbsp;</td><td>the subtree to search. This should be a node of type CXT_Element. NULL is safe.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>pszElement</em>&nbsp;</td><td>the name of the element or attribute to search for.</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>The matching node or NULL on failure. </dd></dl></div></div><p><a class="anchor" name="a279b831e0d678e07d7ccad79d57f6cb"></a><!-- doxytag: member="cpl_minixml.h::CPLSerializeXMLTree" ref="a279b831e0d678e07d7ccad79d57f6cb" args="(CPLXMLNode *psNode)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">char* CPLSerializeXMLTree           </td>          <td>(</td>          <td class="paramtype"><a class="el" href="struct__CPLXMLNode.html">CPLXMLNode</a> *&nbsp;</td>          <td class="paramname"> <em>psNode</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Convert tree into string document. <p>This function converts a CPLXMLNode tree representation of a document into a flat string representation. White space indentation is used visually preserve the tree structure of the document. The returned document becomes owned by the caller and should be freed with CPLFree() when no longer needed.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>psNode</em>&nbsp;</td><td></td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>the document on success or NULL on failure. </dd></dl></div></div><p><a class="anchor" name="4ff79bd96021992ab2008115d4f87ec7"></a><!-- doxytag: member="cpl_minixml.h::CPLSerializeXMLTreeToFile" ref="4ff79bd96021992ab2008115d4f87ec7" args="(CPLXMLNode *psTree, const char *pszFilename)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">int CPLSerializeXMLTreeToFile           </td>          <td>(</td>          <td class="paramtype"><a class="el" href="struct__CPLXMLNode.html">CPLXMLNode</a> *&nbsp;</td>          <td class="paramname"> <em>psTree</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszFilename</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Write document tree to a file. <p>The passed document tree is converted into one big string (with <a class="el" href="cpl__minixml_8h.html#a279b831e0d678e07d7ccad79d57f6cb">CPLSerializeXMLTree()</a>) and then written to the named file. Errors writing the file will be reported by <a class="el" href="cpl__error_8h.html#ad2b98dd58e4de706a245faddac90403">CPLError()</a>. The source document tree is not altered. If the output file already exists it will be overwritten.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>psTree</em>&nbsp;</td><td>the document tree to write. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>pszFilename</em>&nbsp;</td><td>the name of the file to write to. </td></tr>  </table></dl></div></div><p><a class="anchor" name="7abd72304d9ba159c965f5095c97b074"></a><!-- doxytag: member="cpl_minixml.h::CPLSetXMLValue" ref="7abd72304d9ba159c965f5095c97b074" args="(CPLXMLNode *psRoot, const char *pszPath, const char *pszValue)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">int CPLSetXMLValue           </td>          <td>(</td>          <td class="paramtype"><a class="el" href="struct__CPLXMLNode.html">CPLXMLNode</a> *&nbsp;</td>          <td class="paramname"> <em>psRoot</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszPath</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszValue</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Set element value by path. <p>Find (or create) the target element or attribute specified in the path, and assign it the indicated value.<p>Any path elements that do not already exist will be created. The target nodes value (the first CXT_Text child) will be replaced with the provided value.<p>If the target node is an attribute instead of an element, the last separator should be a "#" instead of the normal period path separator.<p>Example: CPLSetXMLValue( "Citation.Id.Description", "DOQ dataset" ); CPLSetXMLValue( "Citation.Id.Description#name", "doq" );<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>psRoot</em>&nbsp;</td><td>the subdocument to be updated.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>pszPath</em>&nbsp;</td><td>the dot seperated path to the target element/attribute.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>pszValue</em>&nbsp;</td><td>the text value to assign.</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE on success. </dd></dl></div></div><p><a class="anchor" name="47c03d9f9d692128d6fa906c17c44bfc"></a><!-- doxytag: member="cpl_minixml.h::CPLStripXMLNamespace" ref="47c03d9f9d692128d6fa906c17c44bfc" args="(CPLXMLNode *psRoot, const char *pszNameSpace, int bRecurse)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void CPLStripXMLNamespace           </td>          <td>(</td>          <td class="paramtype"><a class="el" href="struct__CPLXMLNode.html">CPLXMLNode</a> *&nbsp;</td>          <td class="paramname"> <em>psRoot</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszNamespace</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">int&nbsp;</td>          <td class="paramname"> <em>bRecurse</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Strip indicated namespaces. <p>The subdocument (psRoot) is recursively examined, and any elements with the indicated namespace prefix will have the namespace prefix stripped from the element names. If the passed namespace is NULL, then all namespace prefixes will be stripped.<p>Nodes other than elements should remain unaffected. The changes are made "in place", and should not alter any node locations, only the pszValue field of affected nodes.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>psRoot</em>&nbsp;</td><td>the document to operate on. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>pszNamespace</em>&nbsp;</td><td>the name space prefix (not including colon), or NULL. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>bRecurse</em>&nbsp;</td><td>TRUE to recurse over whole document, or FALSE to only operate on the passed node. </td></tr>  </table></dl></div></div><p><hr>Generated for GDAL by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1.</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -