from <a href="http://www.libexpat.org/">the Expat home page</a>.
</p>
-<p>The bulk of this document was originally commissioned as an article by
-<a href="http://www.xml.com/">XML.com</a>. They graciously allowed
-Clark Cooper to retain copyright and to distribute it with Expat.</p>
+<p>The bulk of this document was originally commissioned as an article
+by <a href="http://www.xml.com/">XML.com</a>. They graciously allowed
+Clark Cooper to retain copyright and to distribute it with Expat.
+This version has been substantially extended to include documentation
+on features which have been added since the original article was
+published, and additional information on using the original
+interface.</p>
<hr />
<h2>Table of Contents</h2>
#include <expat.h>
#ifndef XMLCALL
-#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
+#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
#define XMLCALL __cdecl
#elif defined(__GNUC__)
#define XMLCALL __attribute__((cdecl))
<dd>When defined, character data reported to the application is
encoded in UTF-16 using wide characters of the type
<code>XML_Char</code>. This is implied if
-<code>XML_UNICODE_WCHAR_T</code> is defined.</dt>
+<code>XML_UNICODE_WCHAR_T</code> is defined.</dd>
<dt>XML_UNICODE_WCHAR_T</dt>
<dd>If defined, causes the <code>XML_Char</code> character type to be
<h3><a name="creation">Parser Creation</a></h3>
<pre class="fcndec" id="XML_ParserCreate">
-XML_Parser
+XML_Parser XMLCALL
XML_ParserCreate(const XML_Char *encoding);
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_ParserCreateNS">
-XML_Parser
+XML_Parser XMLCALL
XML_ParserCreateNS(const XML_Char *encoding,
XML_Char sep);
</pre>
part of a legal URI.</div>
<pre class="fcndec" id="XML_ParserCreate_MM">
-XML_Parser
+XML_Parser XMLCALL
XML_ParserCreate_MM(const XML_Char *encoding,
const XML_Memory_Handling_Suite *ms,
const XML_Char *sep);
</div>
<pre class="fcndec" id="XML_ExternalEntityParserCreate">
-XML_Parser
+XML_Parser XMLCALL
XML_ExternalEntityParserCreate(XML_Parser p,
const XML_Char *context,
const XML_Char *encoding);
</div>
<pre class="fcndec" id="XML_ParserFree">
-void
+void XMLCALL
XML_ParserFree(XML_Parser p);
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_ParserReset">
-XML_Bool
+XML_Bool XMLCALL
XML_ParserReset(XML_Parser p,
const XML_Char *encoding);
</pre>
>XML_ExternalEntityParserCreate</a></code>.</p>
<pre class="fcndec" id="XML_Parse">
-enum XML_Status
+enum XML_Status XMLCALL
XML_Parse(XML_Parser p,
const char *s,
int len,
</div>
<pre class="fcndec" id="XML_ParseBuffer">
-enum XML_Status
+enum XML_Status XMLCALL
XML_ParseBuffer(XML_Parser p,
int len,
int isFinal);
</div>
<pre class="fcndec" id="XML_GetBuffer">
-void *
+void * XMLCALL
XML_GetBuffer(XML_Parser p,
int len);
</pre>
<div class="handler">
<pre class="setter" id="XML_SetStartElementHandler">
+void XMLCALL
XML_SetStartElementHandler(XML_Parser p,
XML_StartElementHandler start);
</pre>
<div class="handler">
<pre class="setter" id="XML_SetEndElementHandler">
+void XMLCALL
XML_SetEndElementHandler(XML_Parser p,
XML_EndElementHandler);
</pre>
<div class="handler">
<pre class="setter" id="XML_SetElementHandler">
+void XMLCALL
XML_SetElementHandler(XML_Parser p,
XML_StartElementHandler start,
XML_EndElementHandler end);
<div class="handler">
<pre class="setter" id="XML_SetCharacterDataHandler">
+void XMLCALL
XML_SetCharacterDataHandler(XML_Parser p,
XML_CharacterDataHandler charhndl)
</pre>
<div class="handler">
<pre class="setter" id="XML_SetProcessingInstructionHandler">
+void XMLCALL
XML_SetProcessingInstructionHandler(XML_Parser p,
XML_ProcessingInstructionHandler proc)
</pre>
<div class="handler">
<pre class="setter" id="XML_SetCommentHandler">
+void XMLCALL
XML_SetCommentHandler(XML_Parser p,
XML_CommentHandler cmnt)
</pre>
<div class="handler">
<pre class="setter" id="XML_SetStartCdataSectionHandler">
+void XMLCALL
XML_SetStartCdataSectionHandler(XML_Parser p,
XML_StartCdataSectionHandler start);
</pre>
<div class="handler">
<pre class="setter" id="XML_SetEndCdataSectionHandler">
+void XMLCALL
XML_SetEndCdataSectionHandler(XML_Parser p,
XML_EndCdataSectionHandler end);
</pre>
<div class="handler">
<pre class="setter" id="XML_SetCdataSectionHandler">
+void XMLCALL
XML_SetCdataSectionHandler(XML_Parser p,
XML_StartCdataSectionHandler start,
XML_EndCdataSectionHandler end)
<div class="handler">
<pre class="setter" id="XML_SetDefaultHandler">
+void XMLCALL
XML_SetDefaultHandler(XML_Parser p,
XML_DefaultHandler hndl)
</pre>
<div class="handler">
<pre class="setter" id="XML_SetDefaultHandlerExpand">
+void XMLCALL
XML_SetDefaultHandlerExpand(XML_Parser p,
XML_DefaultHandler hndl)
</pre>
<div class="handler">
<pre class="setter" id="XML_SetExternalEntityRefHandler">
+void XMLCALL
XML_SetExternalEntityRefHandler(XML_Parser p,
XML_ExternalEntityRefHandler hndl)
</pre>
</div>
<pre class="fcndec" id="XML_SetExternalEntityRefHandlerArg">
+void XMLCALL
XML_SetExternalEntityRefHandlerArg(XML_Parser p,
void *arg)
</pre>
<div class="handler">
<pre class="setter" id="XML_SetSkippedEntityHandler">
+void XMLCALL
XML_SetSkippedEntityHandler(XML_Parser p,
XML_SkippedEntityHandler handler)
</pre>
<div class="handler">
<pre class="setter" id="XML_SetUnknownEncodingHandler">
+void XMLCALL
XML_SetUnknownEncodingHandler(XML_Parser p,
XML_UnknownEncodingHandler enchandler,
void *encodingHandlerData)
<div class="handler">
<pre class="setter" id="XML_SetStartNamespaceDeclHandler">
+void XMLCALL
XML_SetStartNamespaceDeclHandler(XML_Parser p,
XML_StartNamespaceDeclHandler start);
</pre>
<div class="handler">
<pre class="setter" id="XML_SetEndNamespaceDeclHandler">
+void XMLCALL
XML_SetEndNamespaceDeclHandler(XML_Parser p,
XML_EndNamespaceDeclHandler end);
</pre>
<div class="handler">
<pre class="setter" id="XML_SetNamespaceDeclHandler">
+void XMLCALL
XML_SetNamespaceDeclHandler(XML_Parser p,
XML_StartNamespaceDeclHandler start,
XML_EndNamespaceDeclHandler end)
<div class="handler">
<pre class="setter" id="XML_SetXmlDeclHandler">
+void XMLCALL
XML_SetXmlDeclHandler(XML_Parser p,
XML_XmlDeclHandler xmldecl);
</pre>
<div class="handler">
<pre class="setter" id="XML_SetStartDoctypeDeclHandler">
+void XMLCALL
XML_SetStartDoctypeDeclHandler(XML_Parser p,
XML_StartDoctypeDeclHandler start);
</pre>
<div class="handler">
<pre class="setter" id="XML_SetEndDoctypeDeclHandler">
+void XMLCALL
XML_SetEndDoctypeDeclHandler(XML_Parser p,
XML_EndDoctypeDeclHandler end);
</pre>
<div class="handler">
<pre class="setter" id="XML_SetDoctypeDeclHandler">
+void XMLCALL
XML_SetDoctypeDeclHandler(XML_Parser p,
XML_StartDoctypeDeclHandler start,
XML_EndDoctypeDeclHandler end);
<div class="handler">
<pre class="setter" id="XML_SetElementDeclHandler">
+void XMLCALL
XML_SetElementDeclHandler(XML_Parser p,
XML_ElementDeclHandler eldecl);
</pre>
<div class="handler">
<pre class="setter" id="XML_SetAttlistDeclHandler">
+void XMLCALL
XML_SetAttlistDeclHandler(XML_Parser p,
XML_AttlistDeclHandler attdecl);
</pre>
<div class="handler">
<pre class="setter" id="XML_SetEntityDeclHandler">
+void XMLCALL
XML_SetEntityDeclHandler(XML_Parser p,
XML_EntityDeclHandler handler);
</pre>
<div class="handler">
<pre class="setter" id="XML_SetUnparsedEntityDeclHandler">
+void XMLCALL
XML_SetUnparsedEntityDeclHandler(XML_Parser p,
XML_UnparsedEntityDeclHandler h)
</pre>
<div class="handler">
<pre class="setter" id="XML_SetNotationDeclHandler">
+void XMLCALL
XML_SetNotationDeclHandler(XML_Parser p,
XML_NotationDeclHandler h)
</pre>
<div class="handler">
<pre class="setter" id="XML_SetNotStandaloneHandler">
+void XMLCALL
XML_SetNotStandaloneHandler(XML_Parser p,
XML_NotStandaloneHandler h)
</pre>
called from within a DTD declaration handler.</p>
<pre class="fcndec" id="XML_GetErrorCode">
-enum XML_Error
+enum XML_Error XMLCALL
XML_GetErrorCode(XML_Parser p);
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_ErrorString">
-const XML_LChar *
+const XML_LChar * XMLCALL
XML_ErrorString(enum XML_Error code);
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_GetCurrentByteIndex">
-long
+long XMLCALL
XML_GetCurrentByteIndex(XML_Parser p);
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_GetCurrentLineNumber">
-int
+int XMLCALL
XML_GetCurrentLineNumber(XML_Parser p);
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_GetCurrentColumnNumber">
-int
+int XMLCALL
XML_GetCurrentColumnNumber(XML_Parser p);
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_GetCurrentByteCount">
-int
+int XMLCALL
XML_GetCurrentByteCount(XML_Parser p);
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_GetInputContext">
-const char *
+const char * XMLCALL
XML_GetInputContext(XML_Parser p,
int *offset,
int *size);
the parser or can be used to dynamicly set parser options.</p>
<pre class="fcndec" id="XML_SetUserData">
-void
+void XMLCALL
XML_SetUserData(XML_Parser p,
void *userData);
</pre>
</div>
<pre class="fcndec" id="XML_GetUserData">
-void *
+void * XMLCALL
XML_GetUserData(XML_Parser p);
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_UseParserAsHandlerArg">
-void
+void XMLCALL
XML_UseParserAsHandlerArg(XML_Parser p);
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_SetBase">
-enum XML_Status
+enum XML_Status XMLCALL
XML_SetBase(XML_Parser p,
const XML_Char *base);
</pre>
</div>
<pre class="fcndec" id="XML_GetBase">
-const XML_Char *
+const XML_Char * XMLCALL
XML_GetBase(XML_Parser p);
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_GetSpecifiedAttributeCount">
-int
+int XMLCALL
XML_GetSpecifiedAttributeCount(XML_Parser p);
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_GetIdAttributeIndex">
-int
+int XMLCALL
XML_GetIdAttributeIndex(XML_Parser p);
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_SetEncoding">
-enum XML_Status
+enum XML_Status XMLCALL
XML_SetEncoding(XML_Parser p,
const XML_Char *encoding);
</pre>
</div>
<pre class="fcndec" id="XML_SetParamEntityParsing">
-int
+int XMLCALL
XML_SetParamEntityParsing(XML_Parser p,
enum XML_ParamEntityParsing code);
</pre>
</div>
<pre class="fcndec" id="XML_UseForeignDTD">
-enum XML_Error
+enum XML_Error XMLCALL
XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD);
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_SetReturnNSTriplet">
-void
+void XMLCALL
XML_SetReturnNSTriplet(XML_Parser parser,
int do_nst);
</pre>
</div>
<pre class="fcndec" id="XML_DefaultCurrent">
-void
+void XMLCALL
XML_DefaultCurrent(XML_Parser parser);
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_ExpatVersion">
-XML_LChar *
+XML_LChar * XMLCALL
XML_ExpatVersion();
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_ExpatVersionInfo">
-struct XML_Expat_Version
+struct XML_Expat_Version XMLCALL
XML_ExpatVersionInfo();
</pre>
<pre class="signature">
</div>
<pre class="fcndec" id="XML_GetFeatureList">
-const XML_Feature *
+const XML_Feature * XMLCALL
XML_GetFeatureList();
</pre>
<pre class="signature">
</div>
<pre class="fcndec" id="XML_FreeContentModel">
-void
+void XMLCALL
XML_FreeContentModel(XML_Parser parser, XML_Content *model);
</pre>
<div class="fcndef">
Windows, at least).</p>
<pre class="fcndec" id="XML_MemMalloc">
-void *
+void * XMLCALL
XML_MemMalloc(XML_Parser parser, size_t size);
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_MemRealloc">
-void *
+void * XMLCALL
XML_MemRealloc(XML_Parser parser, void *ptr, size_t size);
</pre>
<div class="fcndef">
</div>
<pre class="fcndec" id="XML_MemFree">
-void
+void XMLCALL
XML_MemFree(XML_Parser parser, void *ptr);
</pre>
<div class="fcndef">