<li><a href="#XML_ParserCreate_MM">XML_ParserCreate_MM</a></li>
<li><a href="#XML_ExternalEntityParserCreate">XML_ExternalEntityParserCreate</a></li>
<li><a href="#XML_ParserFree">XML_ParserFree</a></li>
+ <li><a href="#XML_ParserReset">XML_ParserReset</a></li>
</ul>
</li>
<li><a href="#parsing">Parsing Functions</a>
<pre class="fcndec" id="XML_ParserCreate">
XML_Parser
-XML_ParserCreate(const XML_Char *encoding)
+XML_ParserCreate(const XML_Char *encoding);
</pre>
<div class="fcndef">
Construct a new parser. If encoding is non-null, it specifies a
<pre class="fcndec" id="XML_ParserCreateNS">
XML_Parser
XML_ParserCreateNS(const XML_Char *encoding,
- XML_Char sep)
+ XML_Char sep);
</pre>
<div class="fcndef">
Constructs a new parser that has namespace processing in effect. Namespace
XML_Parser
XML_ParserCreate_MM(const XML_Char *encoding,
const XML_Memory_Handling_Suite *ms,
- const XML_Char *sep)
+ const XML_Char *sep);
</pre>
<pre class="signature">
typedef struct {
XML_Parser
XML_ExternalEntityParserCreate(XML_Parser p,
const XML_Char *context,
- const XML_Char *encoding)
+ const XML_Char *encoding);
</pre>
<div class="fcndef">
Construct a new <code>XML_Parser</code> object for parsing an external
<pre class="fcndec" id="XML_ParserFree">
void
-XML_ParserFree(XML_Parser p)
+XML_ParserFree(XML_Parser p);
</pre>
<div class="fcndef">
Free memory used by the parser. Your application is responsible for
freeing any memory associated with <a href="#userdata">user data</a>.
</div>
+<pre class="fcndec" id="XML_ParserReset">
+XML_Bool
+XML_ParserReset(XML_Parser p);
+</pre>
+<div class="fcndef">
+Clean up the memory structures maintained by the parser so that it may
+be used again. After this has been called, <code>parser</code> is
+ready to start parsing a new document. This function may not be used
+on a parser created using <code><a href=
+"#XML_ExternalEntityParserCreate" >XML_ExternalEntityParserCreate</a
+></code>; it will return <code>XML_FALSE</code> in that case. Returns
+<code>XML_TRUE</code> on success. Your application is responsible for
+dealing with any memory associated with <a href="#userdata">user data</a>.
+</div>
+
<h3><a name="parsing">Parsing</a></h3>
<p>To state the obvious: the three parsing functions <code><a href=
XML_Parse(XML_Parser p,
const char *s,
int len,
- int isFinal)
+ int isFinal);
</pre>
<pre class="signature">
enum XML_Status {
XML_Status
XML_ParseBuffer(XML_Parser p,
int len,
- int isFinal)
+ int isFinal);
</pre>
<div class="fcndef">
This is just like <code><a href= "#XML_Parse" >XML_Parse</a></code>,
<pre class="fcndec" id="XML_GetBuffer">
void *
XML_GetBuffer(XML_Parser p,
- int len)
+ int len);
</pre>
<div class="fcndef">
Obtain a buffer of size <code>len</code> to read a piece of the document
<pre class="fcndec" id="XML_GetErrorCode">
enum XML_Error
-XML_GetErrorCode(XML_Parser p)
+XML_GetErrorCode(XML_Parser p);
</pre>
<div class="fcndef">
Return what type of error has occurred.
<pre class="fcndec" id="XML_ErrorString">
const XML_LChar *
-XML_ErrorString(int code)
+XML_ErrorString(int code);
</pre>
<div class="fcndef">
Return a string describing the error corresponding to code.
<pre class="fcndec" id="XML_GetCurrentByteIndex">
long
-XML_GetCurrentByteIndex(XML_Parser p)
+XML_GetCurrentByteIndex(XML_Parser p);
</pre>
<div class="fcndef">
Return the byte offset of the position.
<pre class="fcndec" id="XML_GetCurrentLineNumber">
int
-XML_GetCurrentLineNumber(XML_Parser p)
+XML_GetCurrentLineNumber(XML_Parser p);
</pre>
<div class="fcndef">
Return the line number of the position.
<pre class="fcndec" id="XML_GetCurrentColumnNumber">
int
-XML_GetCurrentColumnNumber(XML_Parser p)
+XML_GetCurrentColumnNumber(XML_Parser p);
</pre>
<div class="fcndef">
Return the offset, from the beginning of the current line, of
<pre class="fcndec" id="XML_SetUserData">
void
XML_SetUserData(XML_Parser p,
- void *userData)
+ void *userData);
</pre>
<div class="fcndef">
This sets the user data pointer that gets passed to handlers. It
<pre class="fcndec" id="XML_GetUserData">
void *
-XML_GetUserData(XML_Parser p)
+XML_GetUserData(XML_Parser p);
</pre>
<div class="fcndef">
This returns the user data pointer that gets passed to handlers.
<pre class="fcndec" id="XML_UseParserAsHandlerArg">
void
-XML_UseParserAsHandlerArg(XML_Parser p)
+XML_UseParserAsHandlerArg(XML_Parser p);
</pre>
<div class="fcndef">
After this is called, handlers receive the parser in the userData
<pre class="fcndec" id="XML_SetBase">
int
XML_SetBase(XML_Parser p,
- const XML_Char *base)
+ const XML_Char *base);
</pre>
<div class="fcndef">
Set the base to be used for resolving relative URIs in system
<pre class="fcndec" id="XML_GetBase">
const XML_Char *
-XML_GetBase(XML_Parser p)
+XML_GetBase(XML_Parser p);
</pre>
<div class="fcndef">
Return the base for resolving relative URIs.
<pre class="fcndec" id="XML_GetSpecifiedAttributeCount">
int
-XML_GetSpecifiedAttributeCount(XML_Parser p)
+XML_GetSpecifiedAttributeCount(XML_Parser p);
</pre>
<div class="fcndef">
When attributes are reported to the start handler in the atts vector,
<pre class="fcndec" id="XML_SetEncoding">
int
XML_SetEncoding(XML_Parser p,
- const XML_Char *encoding)
+ const XML_Char *encoding);
</pre>
<div class="fcndef">
Set the encoding to be used by the parser. It is equivalent to
<pre class="fcndec" id="XML_SetParamEntityParsing">
int
XML_SetParamEntityParsing(XML_Parser p,
- enum XML_ParamEntityParsing code)
+ enum XML_ParamEntityParsing code);
</pre>
<div class="fcndef">
This enables parsing of parameter entities, including the external
<pre class="fcndec" id="XML_UseForeignDTD">
enum XML_Error
-XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD)
+XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD);
</pre>
<div class="fcndef">
<p>This function allows an application to provide an external subset