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

📄 mxml.xml

📁 minixml2.5最新的版本。 嵌入式xml 解析、查找、生成、遍历 功能,全部实现是标准c,移植很容易。 最新的2.5
💻 XML
📖 第 1 页 / 共 4 页
字号:
The SAX callback must call mxmlRetain() for any nodes that need tobe kept for later use. Otherwise, nodes are deleted when the parentnode is closed or after each data, comment, CDATA, or directive node.@since Mini-XML 2.3@</description>    <argument name="top" direction="I">      <type>mxml_node_t *</type>      <description>Top node</description>    </argument>    <argument name="fp" direction="I">      <type>FILE *</type>      <description>File to read from</description>    </argument>    <argument name="cb" direction="I">      <type>mxml_load_cb_t</type>      <description>Callback function or MXML_NO_CALLBACK</description>    </argument>    <argument name="sax_cb" direction="I">      <type>mxml_sax_cb_t</type>      <description>SAX callback or MXML_NO_CALLBACK</description>    </argument>    <argument name="sax_data" direction="I">      <type>void *</type>      <description>SAX user data</description>    </argument>  </function>  <function name="mxmlSAXLoadString">    <returnvalue>      <type>mxml_node_t *</type>      <description>First node or NULL if the string has errors.</description>    </returnvalue>    <description>Load a string into an XML node treeusing a SAX callback.The nodes in the specified string are added to the specified top node.If no top node is provided, the XML string MUST be well-formed with asingle parent node like &lt;?xml&gt; for the entire string. The callbackfunction returns the value type that should be used for child nodes.If MXML_NO_CALLBACK is specified then all child nodes will be eitherMXML_ELEMENT or MXML_TEXT nodes.The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK,MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loadingchild nodes of the specified type.The SAX callback must call mxmlRetain() for any nodes that need tobe kept for later use. Otherwise, nodes are deleted when the parentnode is closed or after each data, comment, CDATA, or directive node.@since Mini-XML 2.3@</description>    <argument name="top" direction="I">      <type>mxml_node_t *</type>      <description>Top node</description>    </argument>    <argument name="s" direction="I">      <type>const char *</type>      <description>String to load</description>    </argument>    <argument name="cb" direction="I">      <type>mxml_load_cb_t</type>      <description>Callback function or MXML_NO_CALLBACK</description>    </argument>    <argument name="sax_cb" direction="I">      <type>mxml_sax_cb_t</type>      <description>SAX callback or MXML_NO_CALLBACK</description>    </argument>    <argument name="sax_data" direction="I">      <type>void *</type>      <description>SAX user data</description>    </argument>  </function>  <function name="mxmlSaveAllocString">    <returnvalue>      <type>char *</type>      <description>Allocated string or NULL</description>    </returnvalue>    <description>Save an XML node tree to an allocated string.This function returns a pointer to a string containing the textualrepresentation of the XML node tree.  The string should be freedusing the free() function when you are done with it.  NULL is returnedif the node would produce an empty string or if the string cannot beallocated.The callback argument specifies a function that returns a whitespacestring or NULL before and after each element. If MXML_NO_CALLBACKis specified, whitespace will only be added before MXML_TEXT nodeswith leading whitespace and before attribute names inside openingelement tags.</description>    <argument name="node" direction="I">      <type>mxml_node_t *</type>      <description>Node to write</description>    </argument>    <argument name="cb" direction="I">      <type>mxml_save_cb_t</type>      <description>Whitespace callback or MXML_NO_CALLBACK</description>    </argument>  </function>  <function name="mxmlSaveFd">    <returnvalue>      <type>int</type>      <description>0 on success, -1 on error.</description>    </returnvalue>    <description>Save an XML tree to a file descriptor.The callback argument specifies a function that returns a whitespacestring or NULL before and after each element. If MXML_NO_CALLBACKis specified, whitespace will only be added before MXML_TEXT nodeswith leading whitespace and before attribute names inside openingelement tags.</description>    <argument name="node" direction="I">      <type>mxml_node_t *</type>      <description>Node to write</description>    </argument>    <argument name="fd" direction="I">      <type>int</type>      <description>File descriptor to write to</description>    </argument>    <argument name="cb" direction="I">      <type>mxml_save_cb_t</type>      <description>Whitespace callback or MXML_NO_CALLBACK</description>    </argument>  </function>  <function name="mxmlSaveFile">    <returnvalue>      <type>int</type>      <description>0 on success, -1 on error.</description>    </returnvalue>    <description>Save an XML tree to a file.The callback argument specifies a function that returns a whitespacestring or NULL before and after each element. If MXML_NO_CALLBACKis specified, whitespace will only be added before MXML_TEXT nodeswith leading whitespace and before attribute names inside openingelement tags.</description>    <argument name="node" direction="I">      <type>mxml_node_t *</type>      <description>Node to write</description>    </argument>    <argument name="fp" direction="I">      <type>FILE *</type>      <description>File to write to</description>    </argument>    <argument name="cb" direction="I">      <type>mxml_save_cb_t</type>      <description>Whitespace callback or MXML_NO_CALLBACK</description>    </argument>  </function>  <function name="mxmlSaveString">    <returnvalue>      <type>int</type>      <description>Size of string</description>    </returnvalue>    <description>Save an XML node tree to a string.This function returns the total number of bytes that would berequired for the string but only copies (bufsize - 1) charactersinto the specified buffer.The callback argument specifies a function that returns a whitespacestring or NULL before and after each element. If MXML_NO_CALLBACKis specified, whitespace will only be added before MXML_TEXT nodeswith leading whitespace and before attribute names inside openingelement tags.</description>    <argument name="node" direction="I">      <type>mxml_node_t *</type>      <description>Node to write</description>    </argument>    <argument name="buffer" direction="I">      <type>char *</type>      <description>String buffer</description>    </argument>    <argument name="bufsize" direction="I">      <type>int</type>      <description>Size of string buffer</description>    </argument>    <argument name="cb" direction="I">      <type>mxml_save_cb_t</type>      <description>Whitespace callback or MXML_NO_CALLBACK</description>    </argument>  </function>  <function name="mxmlSetCDATA">    <returnvalue>      <type>int</type>      <description>0 on success, -1 on failure</description>    </returnvalue>    <description>Set the element name of a CDATA node.The node is not changed if it is not a CDATA element node.@since Mini-XML 2.3@</description>    <argument name="node" direction="I">      <type>mxml_node_t *</type>      <description>Node to set</description>    </argument>    <argument name="data" direction="I">      <type>const char *</type>      <description>New data string</description>    </argument>  </function>  <function name="mxmlSetCustom">    <returnvalue>      <type>int</type>      <description>0 on success, -1 on failure</description>    </returnvalue>    <description>Set the data and destructor of a custom data node.The node is not changed if it is not a custom node.@since Mini-XML 2.1@</description>    <argument name="node" direction="I">      <type>mxml_node_t *</type>      <description>Node to set</description>    </argument>    <argument name="data" direction="I">      <type>void *</type>      <description>New data pointer</description>    </argument>    <argument name="destroy" direction="I">      <type>mxml_custom_destroy_cb_t</type>      <description>New destructor function</description>    </argument>  </function>  <function name="mxmlSetCustomHandlers">    <description>Set the handling functions for custom data.The load function accepts a node pointer and a data string and mustreturn 0 on success and non-zero on error.The save function accepts a node pointer and must return a malloc'dstring on success and NULL on error.</description>    <argument name="load" direction="I">      <type>mxml_custom_load_cb_t</type>      <description>Load function</description>    </argument>    <argument name="save" direction="I">      <type>mxml_custom_save_cb_t</type>      <description>Save function</description>    </argument>  </function>  <function name="mxmlSetElement">    <returnvalue>      <type>int</type>      <description>0 on success, -1 on failure</description>    </returnvalue>    <description>Set the name of an element node.The node is not changed if it is not an element node.</description>    <argument name="node" direction="I">      <type>mxml_node_t *</type>      <description>Node to set</description>    </argument>    <argument name="name" direction="I">      <type>const char *</type>      <description>New name string</description>    </argument>  </function>  <function name="mxmlSetErrorCallback">    <description>Set the error message callback.</description>    <argument name="cb" direction="I">      <type>mxml_error_cb_t</type>      <description>Error callback function</description>    </argument>  </function>  <function name="mxmlSetInteger">    <returnvalue>      <type>int</type>      <description>0 on success, -1 on failure</description>    </returnvalue>    <description>Set the value of an integer node.The node is not changed if it is not an integer node.</description>    <argument name="node" direction="I">      <type>mxml_node_t *</type>      <description>Node to set</description>    </argument>    <argument name="integer" direction="I">      <type>int</type>      <description>Integer value</description>    </argument>  </function>  <function name="mxmlSetOpaque">    <returnvalue>      <type>int</type>      <description>0 on success, -1 on failure</description>    </returnvalue>    <description>Set the value of an opaque node.The node is not changed if it is not an opaque node.</description>    <argument name="node" direction="I">      <type>mxml_node_t *</type>      <description>Node to set</description>    </argument>    <argument name="opaque" direction="I">      <type>const char *</type>      <description>Opaque string</description>    </argument>  </function>  <function name="mxmlSetReal">    <returnvalue>      <type>int</type>      <description>0 on success, -1 on failure</description>    </returnvalue>    <description>Set the value of a real number node.The node is not changed if it is not a real number node.</description>    <argument name="node" direction="I">      <type>mxml_node_t *</type>      <description>Node to set</description>    </argument>    <argument name="real" direction="I">      <type>double</type>      <description>Real number value</description>    </argument>  </function>  <function name="mxmlSetText">    <returnvalue>      <type>int</type>      <description>0 on success, -1 on failure</description>    </returnvalue>    <description>Set the value of a text node.The node is not changed if it is not a text node.</description>    <argument name="node" direction="I">      <type>mxml_node_t *</type>      <description>Node to set</description>    </argument>    <argument name="whitespace" direction="I">      <type>int</type>      <description>1 = leading whitespace, 0 = no whitespace</description>    </argument>    <argument name="string" direction="I">

⌨️ 快捷键说明

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