📄 cpl__minixml_8h.html
字号:
<td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Add new sibling. <p>The passed psNewSibling is added to the end of siblings of the psOlderSibling node. That is, it is added to the end of the psNext chain. There is no special handling if psNewSibling is an attribute. If this is required, use <a class="el" href="cpl__minixml_8h.html#cf4fd469090f44089221811f1c550742">CPLAddXMLChild()</a>.<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>psOlderSibling</em> </td><td>the node to attach the sibling after.</td></tr> <tr><td valign="top"></td><td valign="top"><em>psNewSibling</em> </td><td>the node to add at the end of psOlderSiblings psNext chain. </td></tr> </table></dl></div></div><p><a class="anchor" name="50df16661471484493d009bb57a18b88"></a><!-- doxytag: member="cpl_minixml.h::CPLCleanXMLElementName" ref="50df16661471484493d009bb57a18b88" args="(char *)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void CPLCleanXMLElementName </td> <td>(</td> <td class="paramtype">char * </td> <td class="paramname"> <em>pszTarget</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Make string into safe XML token. <p>Modififies a string in place to try and make it into a legal XML token that can be used as an element name. This is accomplished by changing any characters not legal in a token into an underscore.<p>NOTE: This function should implement the rules in section 2.3 of <a href="http://www.w3.org/TR/xml11/">http://www.w3.org/TR/xml11/</a> but it doesn't yet do that properly. We only do a rough approximation of that.<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>pszTarget</em> </td><td>the string to be adjusted. It is altered in place. </td></tr> </table></dl></div></div><p><a class="anchor" name="4c39a48d1488b782097730d8aa4508b1"></a><!-- doxytag: member="cpl_minixml.h::CPLCloneXMLTree" ref="4c39a48d1488b782097730d8aa4508b1" args="(CPLXMLNode *psTree)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="struct__CPLXMLNode.html">CPLXMLNode</a>* CPLCloneXMLTree </td> <td>(</td> <td class="paramtype"><a class="el" href="struct__CPLXMLNode.html">CPLXMLNode</a> * </td> <td class="paramname"> <em>psTree</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Copy tree. <p>Creates a deep copy of a CPLXMLNode tree.<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> </td><td>the tree to duplicate.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>a copy of the whole tree. </dd></dl></div></div><p><a class="anchor" name="fd42dc2352a406a884d77591253e775e"></a><!-- doxytag: member="cpl_minixml.h::CPLCreateXMLElementAndValue" ref="fd42dc2352a406a884d77591253e775e" args="(CPLXMLNode *psParent, const char *pszName, const char *pszValue)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="struct__CPLXMLNode.html">CPLXMLNode</a>* CPLCreateXMLElementAndValue </td> <td>(</td> <td class="paramtype"><a class="el" href="struct__CPLXMLNode.html">CPLXMLNode</a> * </td> <td class="paramname"> <em>psParent</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszName</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszValue</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Create an element and text value. <p>This is function is a convenient short form for:<p><div class="fragment"><pre class="fragment"> <a class="code" href="struct__CPLXMLNode.html">CPLXMLNode</a> *psTextNode; <a class="code" href="struct__CPLXMLNode.html">CPLXMLNode</a> *psElementNode; psElementNode = CPLCreateXMLNode( psParent, <a class="code" href="cpl__minixml_8h.html#e2767267ad31c092d81a2380ee3474a1420845ac8b18bb784ec09e50a9bf3d1e">CXT_Element</a>, pszName ); psTextNode = CPLCreateXMLNode( psElementNode, <a class="code" href="cpl__minixml_8h.html#e2767267ad31c092d81a2380ee3474a1d3f6532b3d5e40b96af1fe17b6df25a1">CXT_Text</a>, pszValue ); <span class="keywordflow">return</span> psElementNode;</pre></div><p>It creates a CXT_Element node, with a CXT_Text child, and attaches the element to the passed parent.<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>psParent</em> </td><td>the parent node to which the resulting node should be attached. May be NULL to keep as freestanding.</td></tr> <tr><td valign="top"></td><td valign="top"><em>pszName</em> </td><td>the element name to create. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pszValue</em> </td><td>the text to attach to the element. Must not be NULL.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>the pointer to the new element node. </dd></dl></div></div><p><a class="anchor" name="8779ff560dde3b2cd076a16059e66771"></a><!-- doxytag: member="cpl_minixml.h::CPLCreateXMLNode" ref="8779ff560dde3b2cd076a16059e66771" args="(CPLXMLNode *poParent, CPLXMLNodeType eType, const char *pszText)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="struct__CPLXMLNode.html">CPLXMLNode</a>* CPLCreateXMLNode </td> <td>(</td> <td class="paramtype"><a class="el" href="struct__CPLXMLNode.html">CPLXMLNode</a> * </td> <td class="paramname"> <em>poParent</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="cpl__minixml_8h.html#e2767267ad31c092d81a2380ee3474a1">CPLXMLNodeType</a> </td> <td class="paramname"> <em>eType</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszText</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Create an document tree item. <p>Create a single CPLXMLNode object with the desired value and type, and attach it as a child of the indicated parent.<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>poParent</em> </td><td>the parent to which this node should be attached as a child. May be NULL to keep as free standing.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>the newly created node, now owned by the caller (or parent node). </dd></dl></div></div><p><a class="anchor" name="9e05eabc54728fb3266576404200da40"></a><!-- doxytag: member="cpl_minixml.h::CPLDestroyXMLNode" ref="9e05eabc54728fb3266576404200da40" args="(CPLXMLNode *)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void CPLDestroyXMLNode </td> <td>(</td> <td class="paramtype"><a class="el" href="struct__CPLXMLNode.html">CPLXMLNode</a> * </td> <td class="paramname"> <em>psNode</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Destroy a tree. <p>This function frees resources associated with a CPLXMLNode and all its children 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>psNode</em> </td><td>the tree to free. </td></tr> </table></dl>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -