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

📄 libxml-xmlregexp.html

📁 xml开源解析代码.版本为libxml2-2.6.29,可支持GB3212.网络消息发送XML时很有用.
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<pre class="programlisting">int	<a href="#xmlRegExecNextValues">xmlRegExecNextValues</a>		(<a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br />					 int * nbval, <br />					 int * nbneg, <br />					 <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** values, <br />					 int * terminal)</pre><pre class="programlisting">int	<a href="#xmlRegExecPushString">xmlRegExecPushString</a>		(<a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br />					 void * data)</pre><pre class="programlisting">int	<a href="#xmlRegExecPushString2">xmlRegExecPushString2</a>		(<a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value2, <br />					 void * data)</pre><pre class="programlisting">void	<a href="#xmlRegFreeExecCtxt">xmlRegFreeExecCtxt</a>		(<a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec)</pre><pre class="programlisting">void	<a href="#xmlRegFreeRegexp">xmlRegFreeRegexp</a>		(<a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> regexp)</pre><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a>	<a href="#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a>	(<a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> comp, <br />						 <a href="libxml-xmlregexp.html#xmlRegExecCallbacks">xmlRegExecCallbacks</a> callback, <br />						 void * data)</pre><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a>	<a href="#xmlRegexpCompile">xmlRegexpCompile</a>	(const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * regexp)</pre><pre class="programlisting">int	<a href="#xmlRegexpExec">xmlRegexpExec</a>			(<a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> comp, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre><pre class="programlisting">int	<a href="#xmlRegexpIsDeterminist">xmlRegexpIsDeterminist</a>		(<a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> comp)</pre><pre class="programlisting">void	<a href="#xmlRegexpPrint">xmlRegexpPrint</a>			(FILE * output, <br />					 <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> regexp)</pre><h2>Description</h2><h3><a name="xmlExpCtxt" id="xmlExpCtxt">Structure xmlExpCtxt</a></h3><pre class="programlisting">Structure xmlExpCtxt<br />struct _xmlExpCtxt {The content of this structure is not made public by the API.}</pre><h3><a name="xmlExpNode" id="xmlExpNode">Structure xmlExpNode</a></h3><pre class="programlisting">Structure xmlExpNode<br />struct _xmlExpNode {The content of this structure is not made public by the API.}</pre><h3>Enum <a name="xmlExpNodeType" id="xmlExpNodeType">xmlExpNodeType</a></h3><pre class="programlisting">Enum xmlExpNodeType {    <a name="XML_EXP_EMPTY" id="XML_EXP_EMPTY">XML_EXP_EMPTY</a> = 0    <a name="XML_EXP_FORBID" id="XML_EXP_FORBID">XML_EXP_FORBID</a> = 1    <a name="XML_EXP_ATOM" id="XML_EXP_ATOM">XML_EXP_ATOM</a> = 2    <a name="XML_EXP_SEQ" id="XML_EXP_SEQ">XML_EXP_SEQ</a> = 3    <a name="XML_EXP_OR" id="XML_EXP_OR">XML_EXP_OR</a> = 4    <a name="XML_EXP_COUNT" id="XML_EXP_COUNT">XML_EXP_COUNT</a> = 5}</pre><h3><a name="xmlRegExecCtxt" id="xmlRegExecCtxt">Structure xmlRegExecCtxt</a></h3><pre class="programlisting">Structure xmlRegExecCtxt<br />struct _xmlRegExecCtxt {The content of this structure is not made public by the API.}</pre>      A libxml progressive regular expression evaluation context    <h3><a name="xmlRegexp" id="xmlRegexp">Structure xmlRegexp</a></h3><pre class="programlisting">Structure xmlRegexp<br />struct _xmlRegexp {The content of this structure is not made public by the API.}</pre>      A libxml regular expression, they can actually be far more complex thank the POSIX regex expressions.    <h3><a name="xmlExpCtxtNbCons" id="xmlExpCtxtNbCons"></a>Function: xmlExpCtxtNbCons</h3><pre class="programlisting">int	xmlExpCtxtNbCons		(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt)<br /></pre><p>Debugging facility provides the number of allocated nodes over lifetime</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an expression context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of nodes ever allocated or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlExpCtxtNbNodes" id="xmlExpCtxtNbNodes"></a>Function: xmlExpCtxtNbNodes</h3><pre class="programlisting">int	xmlExpCtxtNbNodes		(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt)<br /></pre><p>Debugging facility provides the number of allocated nodes at a that point</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an expression context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of nodes in use or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlExpDump" id="xmlExpDump"></a>Function: xmlExpDump</h3><pre class="programlisting">void	xmlExpDump			(<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br />					 <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> expr)<br /></pre><p>Serialize the expression as compiled to the buffer</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>a buffer to receive the output</td></tr><tr><td><span class="term"><i><tt>expr</tt></i>:</span></td><td>the compiled expression</td></tr></tbody></table></div><h3><a name="xmlExpExpDerive" id="xmlExpExpDerive"></a>Function: xmlExpExpDerive</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a>	xmlExpExpDerive		(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br />					 <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> sub)<br /></pre><p>Evaluates the expression resulting from @exp consuming a sub expression @sub Based on algebraic derivation and sometimes direct Brzozowski derivation it usually tatkes less than linear time and can handle expressions generating infinite languages.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expressions context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the englobing expression</td></tr><tr><td><span class="term"><i><tt>sub</tt></i>:</span></td><td>the subexpression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting expression or NULL in case of internal error, the result must be freed</td></tr></tbody></table></div><h3><a name="xmlExpFree" id="xmlExpFree"></a>Function: xmlExpFree</h3><pre class="programlisting">void	xmlExpFree			(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)<br /></pre><p>Dereference the expression</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr></tbody></table></div><h3><a name="xmlExpFreeCtxt" id="xmlExpFreeCtxt"></a>Function: xmlExpFreeCtxt</h3><pre class="programlisting">void	xmlExpFreeCtxt			(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt)<br /></pre><p>Free an expression context</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an expression context</td></tr></tbody></table></div><h3><a name="xmlExpGetLanguage" id="xmlExpGetLanguage"></a>Function: xmlExpGetLanguage</h3><pre class="programlisting">int	xmlExpGetLanguage		(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** langList, <br />					 int len)<br /></pre><p>Find all the strings used in @exp and store them in @list</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>langList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div><h3><a name="xmlExpGetStart" id="xmlExpGetStart"></a>Function: xmlExpGetStart</h3><pre class="programlisting">int	xmlExpGetStart			(<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br />					 const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** tokList, <br />					 int len)<br /></pre><p>Find all the strings that appears at the start of the languages accepted by @exp and store them in @list. E.g. for (a, b) | c it will return the list [a, c]</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>tokList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div><h3><a name="xmlExpIsNillable" id="xmlExpIsNillable"></a>Function: xmlExpIsNillable</h3><pre class="programlisting">int	xmlExpIsNillable		(<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)<br />

⌨️ 快捷键说明

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