The Expat API version 20201221. More...
#include "expatapi.h"
Data Fields | |
XML_Parser(* | XML_ParserCreate_MM )(const XML_Char *encoding, const XML_Memory_Handling_Suite *memsuite, const XML_Char *namespaceSeparator) |
Create an XML parser instance specifying memory handling functions and namespace processing. More... | |
void(* | XML_ParserFree )(XML_Parser parser) |
Free an XML parser instance. More... | |
void(* | XML_SetNamespaceDeclHandler )(XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end) |
Set the namespace declaration handler callbacks. More... | |
void(* | XML_SetDoctypeDeclHandler )(XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end) |
Set the DOCTYPE declaration handler callbacks. More... | |
void(* | XML_SetXmlDeclHandler )(XML_Parser parser, XML_XmlDeclHandler xmldecl) |
Set the XML declaration handler callback. More... | |
void(* | XML_SetElementHandler )(XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end) |
Set the element handler callbacks. More... | |
void(* | XML_SetCharacterDataHandler )(XML_Parser parser, XML_CharacterDataHandler handler) |
Set the CDATA handler callback. More... | |
void(* | XML_SetProcessingInstructionHandler )(XML_Parser parser, XML_ProcessingInstructionHandler handler) |
Set the XML processing instruction handler callback. More... | |
void(* | XML_SetCommentHandler )(XML_Parser parser, XML_CommentHandler handler) |
Set the XML comment handler callback. More... | |
void(* | XML_SetCdataSectionHandler )(XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end) |
Set the CDATA section handler callbacks. More... | |
void(* | XML_SetReturnNSTriplet )(XML_Parser parser, int do_nst) |
Set the XML comment handler callback. More... | |
void(* | XML_SetUserData )(XML_Parser parser, void *userData) |
Set the user data pointer passed to callback functions. More... | |
enum XML_Status(* | XML_Parse )(XML_Parser parser, const char *s, int len, int isFinal) |
Parse a chunk of XML data. More... | |
void *(* | XML_GetBuffer )(XML_Parser parser, int len) |
Get a buffer to read XML data into. More... | |
enum XML_Status(* | XML_ParseBuffer )(XML_Parser parser, int len, int isFinal) |
Parse a chunk of XML data stored in an internal buffer. More... | |
enum XML_Status(* | XML_StopParser )(XML_Parser parser, XML_Bool resumable) |
Stop an XML parser. More... | |
enum XML_Error(* | XML_GetErrorCode )(XML_Parser parser) |
Get the error code from a failed parsing operation. More... | |
XML_Size(* | XML_GetCurrentLineNumber )(XML_Parser parser) |
Get the line number where an error occurred. More... | |
XML_Size(* | XML_GetCurrentColumnNumber )(XML_Parser parser) |
Get the column number where an error occurred. More... | |
XML_Index(* | XML_GetCurrentByteIndex )(XML_Parser parser) |
Get the byte index where an error occurred. More... | |
const XML_LChar *(* | XML_ErrorString )(enum XML_Error code) |
Return an error string corresponding to an XML error code. More... | |
The Expat API version 20201221.
const XML_LChar*( * sw_expat_api_20201221::XML_ErrorString) (enum XML_Error code) |
Return an error string corresponding to an XML error code.
[in] | code | An XML error code returned by XML_GetErrorCode(). |
See the Expat API documentation for more details.
void*( * sw_expat_api_20201221::XML_GetBuffer) (XML_Parser parser, int len) |
Get a buffer to read XML data into.
[in] | len | The number of bytes to store in the buffer. |
NULL
on error.Using XML_GetBuffer() and XML_ParseBuffer() avoids an extra data copy if you are reading data from a file or non-memory source. If the XML data is already in memory, using XML_Parse() is equivalent.
See the Expat API documentation for more details.
XML_Index( * sw_expat_api_20201221::XML_GetCurrentByteIndex) (XML_Parser parser) |
Get the byte index where an error occurred.
[in] | parser | An XML parser handle. |
See the Expat API documentation for more details.
XML_Size( * sw_expat_api_20201221::XML_GetCurrentColumnNumber) (XML_Parser parser) |
Get the column number where an error occurred.
[in] | parser | An XML parser handle. |
See the Expat API documentation for more details.
XML_Size( * sw_expat_api_20201221::XML_GetCurrentLineNumber) (XML_Parser parser) |
Get the line number where an error occurred.
[in] | parser | An XML parser handle. |
See the Expat API documentation for more details.
enum XML_Error( * sw_expat_api_20201221::XML_GetErrorCode) (XML_Parser parser) |
Get the error code from a failed parsing operation.
[in] | parser | An XML parser handle. |
XML_ERROR_*
enumeration codes. An error string corresponding to this error code can be returned by calling XML_ErrorString().See the Expat API documentation for more details.
enum XML_Status( * sw_expat_api_20201221::XML_Parse) (XML_Parser parser, const char *s, int len, int isFinal) |
Parse a chunk of XML data.
[in] | parser | An XML parser handle. |
[in] | s | A buffer containing part or all of an XML document. |
[in] | len | The number of bytes in buffer s. |
[in] | isFinal | A flag indicating if this is the last buffer of data for the document. |
XML_STATUS_OK | on success. |
XML_STATUS_ERROR | if there was a parse error. |
Calling this function will provoke callbacks to functions registered for the declarations, elements, comments, and character data.
Using XML_GetBuffer() and XML_ParseBuffer() avoids an extra data copy if you are reading data from a file or non-memory source. If the XML data is already in memory, using XML_Parse() is equivalent.
See the Expat API documentation for more details.
enum XML_Status( * sw_expat_api_20201221::XML_ParseBuffer) (XML_Parser parser, int len, int isFinal) |
Parse a chunk of XML data stored in an internal buffer.
[in] | parser | An XML parser handle. |
[in] | len | The number of bytes in buffer s. |
[in] | isFinal | A flag indicating if this is the last buffer of data for the document. |
XML_STATUS_OK | on success. |
XML_STATUS_ERROR | if there was a parse error. |
This function parses data previously loaded into an Expat internal buffer allocated using XML_GetBuffer(). Calling this function will provoke callbacks to functions registered for the declarations, elements, comments, and character data.
Using XML_GetBuffer() and XML_ParseBuffer() avoids an extra data copy if you are reading data from a file or non-memory source. If the XML data is already in memory, using XML_Parse() is equivalent.
See the Expat API documentation for more details.
XML_Parser( * sw_expat_api_20201221::XML_ParserCreate_MM) (const XML_Char *encoding, const XML_Memory_Handling_Suite *memsuite, const XML_Char *namespaceSeparator) |
Create an XML parser instance specifying memory handling functions and namespace processing.
[in] | encoding | The encoding of the XML, or NULL if none specified. |
[in] | memsuite | A structure with allocation, reallocation, and free functions. |
[in] | namespaceSeparator | Namespace expanded element names and attribute names are returned as a concatenation of the namespace URI, namespaceSeparator, and the local part of the name. |
NULL
on failure.See the Expat API documentation for more details.
void( * sw_expat_api_20201221::XML_ParserFree) (XML_Parser parser) |
Free an XML parser instance.
[in] | parser | An XML parser handle. |
See the Expat API documentation for more details.
void( * sw_expat_api_20201221::XML_SetCdataSectionHandler) (XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end) |
Set the CDATA section handler callbacks.
[in] | parser | An XML parser handle. |
[in] | start | CDATA section start callback function. This function is called with user data only. |
[in] | end | CDATA section end callback function. This function is called with user data only. |
See the Expat API documentation for more details.
void( * sw_expat_api_20201221::XML_SetCharacterDataHandler) (XML_Parser parser, XML_CharacterDataHandler handler) |
Set the CDATA handler callback.
[in] | parser | An XML parser handle. |
[in] | handler | CDATA callback function. This function is called with user data, a pointer to the character data, and the length of the character data. |
See the Expat API documentation for more details.
void( * sw_expat_api_20201221::XML_SetCommentHandler) (XML_Parser parser, XML_CommentHandler handler) |
Set the XML comment handler callback.
[in] | parser | An XML parser handle. |
[in] | handler | Comment callback function. This function is called with user data and a pointer to the comment. |
See the Expat API documentation for more details.
void( * sw_expat_api_20201221::XML_SetDoctypeDeclHandler) (XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end) |
Set the DOCTYPE declaration handler callbacks.
[in] | parser | An XML parser handle. |
[in] | start | Document type start callback function. This function is called with user data, the DOCTYPE name, a SYSTEM ID, a PUBLIC ID and flag indicating if the document type has an internal subset. |
[in] | end | Document type end callback function. This function is called with user data only. |
See the Expat API documentation for more details.
void( * sw_expat_api_20201221::XML_SetElementHandler) (XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end) |
Set the element handler callbacks.
[in] | parser | An XML parser handle. |
[in] | start | Element start callback function. This function is called with user data, the element name, and an array of element attribute name,value pairs terminated by a NULL pointers. |
[in] | end | Element end callback function. This function is called with user data and the element name. |
See the Expat API documentation for more details.
void( * sw_expat_api_20201221::XML_SetNamespaceDeclHandler) (XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end) |
Set the namespace declaration handler callbacks.
[in] | parser | An XML parser handle. |
[in] | start | Namespace start callback function. This function is called with user data, the namespace prefix, and the namespace URI. |
[in] | end | Namespace end callback function. This function is called with user data and the namespace prefix. |
See the Expat API documentation for more details.
void( * sw_expat_api_20201221::XML_SetProcessingInstructionHandler) (XML_Parser parser, XML_ProcessingInstructionHandler handler) |
Set the XML processing instruction handler callback.
[in] | parser | An XML parser handle. |
[in] | handler | Processing instruction callback function. This function is called with user data, a target pointer and data pointer. The target is the first word in the processing instruction. The data is the rest of the characters in it after skipping all whitespace after the initial word. |
See the Expat API documentation for more details.
void( * sw_expat_api_20201221::XML_SetReturnNSTriplet) (XML_Parser parser, int do_nst) |
Set the XML comment handler callback.
[in] | parser | An XML parser handle. |
[in] | do_nst | A flag indicating whether qualified namespace names are returned as three parts (URI, local name, and prefix), or as one. |
See the Expat API documentation for more details.
void( * sw_expat_api_20201221::XML_SetUserData) (XML_Parser parser, void *userData) |
Set the user data pointer passed to callback functions.
[in] | parser | An XML parser handle. |
[in] | userData | The user data pointer that is passed to callback functions. |
See the Expat API documentation for more details.
void( * sw_expat_api_20201221::XML_SetXmlDeclHandler) (XML_Parser parser, XML_XmlDeclHandler xmldecl) |
Set the XML declaration handler callback.
[in] | parser | An XML parser handle. |
[in] | xmldecl | XML callback function. This function is called with user data, the XML version, the XML encoding and an indication of the state of the XML standalone attribute. |
See the Expat API documentation for more details.
enum XML_Status( * sw_expat_api_20201221::XML_StopParser) (XML_Parser parser, XML_Bool resumable) |
Stop an XML parser.
[in] | parser | An XML parser handle. |
[in] | resumable | XML_FALSE if aborting the parse, XML_TRUE if the parsing may be resumed later. |
XML_STATUS_OK | on success. |
XML_STATUS_ERROR | if there was an error. |
See the Expat API documentation for more details.