| <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xmlerror</title><meta name="generator" content="DocBook XSL Stylesheets V1.58.1"><style xmlns="http://www.w3.org/TR/xhtml1/transitional" type="text/css"> |
| .synopsis, .classsynopsis { |
| background: #eeeeee; |
| border: solid 1px #aaaaaa; |
| padding: 0.5em; |
| } |
| .programlisting { |
| background: #eeeeff; |
| border: solid 1px #aaaaff; |
| padding: 0.5em; |
| } |
| .variablelist { |
| padding: 4px; |
| margin-left: 3em; |
| } |
| .navigation { |
| background: #ffeeee; |
| border: solid 1px #ffaaaa; |
| margin-top: 0.5em; |
| margin-bottom: 0.5em; |
| } |
| .navigation a { |
| color: #770000; |
| } |
| .navigation a:visited { |
| color: #550000; |
| } |
| .navigation .title { |
| font-size: 200%; |
| } |
| </style><link rel="home" href="index.html" title="Gnome XML Library Reference Manual"><link rel="up" href="libxml-lib.html" title="Libxml Library Reference"><link rel="previous" href="libxml-uri.html" title="uri"><link rel="next" href="libxml-HTMLparser.html" title="HTMLparser"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-uri.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td><td><a accesskey="u" href="libxml-lib.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td><th width="100%" align="center">Gnome XML Library Reference Manual</th><td><a accesskey="n" href="libxml-HTMLparser.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td></tr></table><div class="refentry" lang="en"><a name="libxml-xmlerror"></a><div class="titlepage"></div><div class="refnamediv"><h2>xmlerror</h2><p>xmlerror — </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis"> |
| |
| |
| |
| enum <a href="libxml-xmlerror.html#xmlParserErrors">xmlParserErrors</a>; |
| void (<a href="libxml-xmlerror.html#xmlGenericErrorFunc">*xmlGenericErrorFunc</a>) (void *ctx, |
| const char *msg, |
| ...); |
| void <a href="libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a> (void *ctx, |
| <a href="libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> handler); |
| void <a href="libxml-xmlerror.html#initGenericErrorDefaultFunc">initGenericErrorDefaultFunc</a> (<a href="libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> *handler); |
| void <a href="libxml-xmlerror.html#xmlParserError">xmlParserError</a> (void *ctx, |
| const char *msg, |
| ...); |
| void <a href="libxml-xmlerror.html#xmlParserWarning">xmlParserWarning</a> (void *ctx, |
| const char *msg, |
| ...); |
| void <a href="libxml-xmlerror.html#xmlParserValidityError">xmlParserValidityError</a> (void *ctx, |
| const char *msg, |
| ...); |
| void <a href="libxml-xmlerror.html#xmlParserValidityWarning">xmlParserValidityWarning</a> (void *ctx, |
| const char *msg, |
| ...); |
| void <a href="libxml-xmlerror.html#xmlParserPrintFileInfo">xmlParserPrintFileInfo</a> (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input); |
| void <a href="libxml-xmlerror.html#xmlParserPrintFileContext">xmlParserPrintFileContext</a> (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input); |
| </pre></div><div class="refsect1" lang="en"><h2>Description</h2><p> |
| |
| </p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="xmlParserErrors"></a>enum xmlParserErrors</h3><pre class="programlisting">typedef enum { |
| XML_ERR_OK = 0, |
| XML_ERR_INTERNAL_ERROR, |
| XML_ERR_NO_MEMORY, |
| |
| XML_ERR_DOCUMENT_START, /* 3 */ |
| XML_ERR_DOCUMENT_EMPTY, |
| XML_ERR_DOCUMENT_END, |
| |
| XML_ERR_INVALID_HEX_CHARREF, /* 6 */ |
| XML_ERR_INVALID_DEC_CHARREF, |
| XML_ERR_INVALID_CHARREF, |
| XML_ERR_INVALID_CHAR, |
| |
| XML_ERR_CHARREF_AT_EOF, /* 10 */ |
| XML_ERR_CHARREF_IN_PROLOG, |
| XML_ERR_CHARREF_IN_EPILOG, |
| XML_ERR_CHARREF_IN_DTD, |
| XML_ERR_ENTITYREF_AT_EOF, |
| XML_ERR_ENTITYREF_IN_PROLOG, |
| XML_ERR_ENTITYREF_IN_EPILOG, |
| XML_ERR_ENTITYREF_IN_DTD, |
| XML_ERR_PEREF_AT_EOF, |
| XML_ERR_PEREF_IN_PROLOG, |
| XML_ERR_PEREF_IN_EPILOG, |
| XML_ERR_PEREF_IN_INT_SUBSET, |
| |
| XML_ERR_ENTITYREF_NO_NAME, /* 22 */ |
| XML_ERR_ENTITYREF_SEMICOL_MISSING, |
| |
| XML_ERR_PEREF_NO_NAME, /* 24 */ |
| XML_ERR_PEREF_SEMICOL_MISSING, |
| |
| XML_ERR_UNDECLARED_ENTITY, /* 26 */ |
| XML_WAR_UNDECLARED_ENTITY, |
| XML_ERR_UNPARSED_ENTITY, |
| XML_ERR_ENTITY_IS_EXTERNAL, |
| XML_ERR_ENTITY_IS_PARAMETER, |
| |
| XML_ERR_UNKNOWN_ENCODING, /* 31 */ |
| XML_ERR_UNSUPPORTED_ENCODING, |
| |
| XML_ERR_STRING_NOT_STARTED, /* 33 */ |
| XML_ERR_STRING_NOT_CLOSED, |
| XML_ERR_NS_DECL_ERROR, |
| |
| XML_ERR_ENTITY_NOT_STARTED, /* 36 */ |
| XML_ERR_ENTITY_NOT_FINISHED, |
| |
| XML_ERR_LT_IN_ATTRIBUTE, /* 38 */ |
| XML_ERR_ATTRIBUTE_NOT_STARTED, |
| XML_ERR_ATTRIBUTE_NOT_FINISHED, |
| XML_ERR_ATTRIBUTE_WITHOUT_VALUE, |
| XML_ERR_ATTRIBUTE_REDEFINED, |
| |
| XML_ERR_LITERAL_NOT_STARTED, /* 43 */ |
| XML_ERR_LITERAL_NOT_FINISHED, |
| |
| XML_ERR_COMMENT_NOT_FINISHED, /* 45 */ |
| |
| XML_ERR_PI_NOT_STARTED, /* 47 */ |
| XML_ERR_PI_NOT_FINISHED, |
| |
| XML_ERR_NOTATION_NOT_STARTED, /* 49 */ |
| XML_ERR_NOTATION_NOT_FINISHED, |
| |
| XML_ERR_ATTLIST_NOT_STARTED, /* 51 */ |
| XML_ERR_ATTLIST_NOT_FINISHED, |
| |
| XML_ERR_MIXED_NOT_STARTED, /* 53 */ |
| XML_ERR_MIXED_NOT_FINISHED, |
| |
| XML_ERR_ELEMCONTENT_NOT_STARTED, /* 55 */ |
| XML_ERR_ELEMCONTENT_NOT_FINISHED, |
| |
| XML_ERR_XMLDECL_NOT_STARTED, /* 57 */ |
| XML_ERR_XMLDECL_NOT_FINISHED, |
| |
| XML_ERR_CONDSEC_NOT_STARTED, /* 59 */ |
| XML_ERR_CONDSEC_NOT_FINISHED, |
| |
| XML_ERR_EXT_SUBSET_NOT_FINISHED, /* 61 */ |
| |
| XML_ERR_DOCTYPE_NOT_FINISHED, /* 62 */ |
| |
| XML_ERR_MISPLACED_CDATA_END, /* 63 */ |
| XML_ERR_CDATA_NOT_FINISHED, |
| |
| XML_ERR_RESERVED_XML_NAME, /* 65 */ |
| |
| XML_ERR_SPACE_REQUIRED, /* 66 */ |
| XML_ERR_SEPARATOR_REQUIRED, |
| XML_ERR_NMTOKEN_REQUIRED, |
| XML_ERR_NAME_REQUIRED, |
| XML_ERR_PCDATA_REQUIRED, |
| XML_ERR_URI_REQUIRED, |
| XML_ERR_PUBID_REQUIRED, |
| XML_ERR_LT_REQUIRED, |
| XML_ERR_GT_REQUIRED, |
| XML_ERR_LTSLASH_REQUIRED, |
| XML_ERR_EQUAL_REQUIRED, |
| |
| XML_ERR_TAG_NAME_MISMATCH, /* 77 */ |
| XML_ERR_TAG_NOT_FINISHED, |
| |
| XML_ERR_STANDALONE_VALUE, /* 79 */ |
| |
| XML_ERR_ENCODING_NAME, /* 80 */ |
| |
| XML_ERR_HYPHEN_IN_COMMENT, /* 81 */ |
| |
| XML_ERR_INVALID_ENCODING, /* 82 */ |
| |
| XML_ERR_EXT_ENTITY_STANDALONE, /* 83 */ |
| |
| XML_ERR_CONDSEC_INVALID, /* 84 */ |
| |
| XML_ERR_VALUE_REQUIRED, /* 85 */ |
| |
| XML_ERR_NOT_WELL_BALANCED, /* 86 */ |
| XML_ERR_EXTRA_CONTENT, /* 87 */ |
| XML_ERR_ENTITY_CHAR_ERROR, /* 88 */ |
| XML_ERR_ENTITY_PE_INTERNAL, /* 88 */ |
| XML_ERR_ENTITY_LOOP, /* 89 */ |
| XML_ERR_ENTITY_BOUNDARY, /* 90 */ |
| XML_ERR_INVALID_URI, /* 91 */ |
| XML_ERR_URI_FRAGMENT, /* 92 */ |
| XML_WAR_CATALOG_PI, /* 93 */ |
| XML_ERR_NO_DTD /* 94 */ |
| }xmlParserErrors; |
| </pre><p> |
| |
| </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGenericErrorFunc"></a>xmlGenericErrorFunc ()</h3><pre class="programlisting">void (*xmlGenericErrorFunc) (void *ctx, |
| const char *msg, |
| ...);</pre><p> |
| Signature of the function to use when there is an error and |
| no parsing or validity context available .</p><p> |
| |
| </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> a parsing context |
| </td></tr><tr><td><span class="term"><i><tt>msg</tt></i> :</span></td><td> the message |
| </td></tr><tr><td><span class="term"><i><tt>...</tt></i> :</span></td><td> the extra arguments of the varags to format the message |
| </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSetGenericErrorFunc"></a>xmlSetGenericErrorFunc ()</h3><pre class="programlisting">void xmlSetGenericErrorFunc (void *ctx, |
| <a href="libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> handler);</pre><p> |
| Function to reset the handler and the error context for out of |
| context error messages. |
| This simply means that <i><tt>handler</tt></i> will be called for subsequent |
| error messages while not parsing nor validating. And <i><tt>ctx</tt></i> will |
| be passed as first argument to <i><tt>handler</tt></i> |
| One can simply force messages to be emitted to another FILE * than |
| stderr by setting <i><tt>ctx</tt></i> to this file handle and <i><tt>handler</tt></i> to NULL.</p><p> |
| |
| </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> the new error handling context |
| </td></tr><tr><td><span class="term"><i><tt>handler</tt></i> :</span></td><td> the new handler function |
| </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="initGenericErrorDefaultFunc"></a>initGenericErrorDefaultFunc ()</h3><pre class="programlisting">void initGenericErrorDefaultFunc (<a href="libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> *handler);</pre><p> |
| Set or reset (if NULL) the default handler for generic errors |
| to the builtin error function.</p><p> |
| |
| </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>handler</tt></i> :</span></td><td> the handler |
| </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserError"></a>xmlParserError ()</h3><pre class="programlisting">void xmlParserError (void *ctx, |
| const char *msg, |
| ...);</pre><p> |
| Display and format an error messages, gives file, line, position and |
| extra parameters.</p><p> |
| |
| </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an XML parser context |
| </td></tr><tr><td><span class="term"><i><tt>msg</tt></i> :</span></td><td> the message to display/transmit |
| </td></tr><tr><td><span class="term"><i><tt>...</tt></i> :</span></td><td> extra parameters for the message display |
| </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserWarning"></a>xmlParserWarning ()</h3><pre class="programlisting">void xmlParserWarning (void *ctx, |
| const char *msg, |
| ...);</pre><p> |
| Display and format a warning messages, gives file, line, position and |
| extra parameters.</p><p> |
| |
| </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an XML parser context |
| </td></tr><tr><td><span class="term"><i><tt>msg</tt></i> :</span></td><td> the message to display/transmit |
| </td></tr><tr><td><span class="term"><i><tt>...</tt></i> :</span></td><td> extra parameters for the message display |
| </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserValidityError"></a>xmlParserValidityError ()</h3><pre class="programlisting">void xmlParserValidityError (void *ctx, |
| const char *msg, |
| ...);</pre><p> |
| Display and format an validity error messages, gives file, |
| line, position and extra parameters.</p><p> |
| |
| </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an XML parser context |
| </td></tr><tr><td><span class="term"><i><tt>msg</tt></i> :</span></td><td> the message to display/transmit |
| </td></tr><tr><td><span class="term"><i><tt>...</tt></i> :</span></td><td> extra parameters for the message display |
| </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserValidityWarning"></a>xmlParserValidityWarning ()</h3><pre class="programlisting">void xmlParserValidityWarning (void *ctx, |
| const char *msg, |
| ...);</pre><p> |
| Display and format a validity warning messages, gives file, line, |
| position and extra parameters.</p><p> |
| |
| </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an XML parser context |
| </td></tr><tr><td><span class="term"><i><tt>msg</tt></i> :</span></td><td> the message to display/transmit |
| </td></tr><tr><td><span class="term"><i><tt>...</tt></i> :</span></td><td> extra parameters for the message display |
| </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserPrintFileInfo"></a>xmlParserPrintFileInfo ()</h3><pre class="programlisting">void xmlParserPrintFileInfo (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input);</pre><p> |
| Displays the associated file and line informations for the current input</p><p> |
| |
| </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>input</tt></i> :</span></td><td> an xmlParserInputPtr input |
| </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserPrintFileContext"></a>xmlParserPrintFileContext ()</h3><pre class="programlisting">void xmlParserPrintFileContext (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input);</pre><p> |
| Displays current context within the input content for error tracking</p><p> |
| |
| </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>input</tt></i> :</span></td><td> an xmlParserInputPtr input |
| </td></tr></tbody></table></div></div></div></div><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libxml-uri.html"><b><< uri</b></a></td><td align="right"><a accesskey="n" href="libxml-HTMLparser.html"><b>HTMLparser >></b></a></td></tr></table></body></html> |