Harlequin RIP SDK
sw_expat_api_20201221 Struct Reference

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...
 

Detailed Description

The Expat API version 20201221.

Field Documentation

◆ XML_ErrorString

const XML_LChar*( * sw_expat_api_20201221::XML_ErrorString) (enum XML_Error code)

Return an error string corresponding to an XML error code.

Parameters
[in]codeAn XML error code returned by XML_GetErrorCode().
Returns
A string describing the error in code.

See the Expat API documentation for more details.

◆ XML_GetBuffer

void*( * sw_expat_api_20201221::XML_GetBuffer) (XML_Parser parser, int len)

Get a buffer to read XML data into.

Parameters
[in]lenThe number of bytes to store in the buffer.
Returns
A buffer of at least len to read XML data into, or 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_GetCurrentByteIndex

XML_Index( * sw_expat_api_20201221::XML_GetCurrentByteIndex) (XML_Parser parser)

Get the byte index where an error occurred.

Parameters
[in]parserAn XML parser handle.
Returns
The current byte index in the XML document.

See the Expat API documentation for more details.

◆ XML_GetCurrentColumnNumber

XML_Size( * sw_expat_api_20201221::XML_GetCurrentColumnNumber) (XML_Parser parser)

Get the column number where an error occurred.

Parameters
[in]parserAn XML parser handle.
Returns
The current column number.

See the Expat API documentation for more details.

◆ XML_GetCurrentLineNumber

XML_Size( * sw_expat_api_20201221::XML_GetCurrentLineNumber) (XML_Parser parser)

Get the line number where an error occurred.

Parameters
[in]parserAn XML parser handle.
Returns
The current line number.

See the Expat API documentation for more details.

◆ XML_GetErrorCode

enum XML_Error( * sw_expat_api_20201221::XML_GetErrorCode) (XML_Parser parser)

Get the error code from a failed parsing operation.

Parameters
[in]parserAn XML parser handle.
Returns
One of the 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.

◆ XML_Parse

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.

Parameters
[in]parserAn XML parser handle.
[in]sA buffer containing part or all of an XML document.
[in]lenThe number of bytes in buffer s.
[in]isFinalA flag indicating if this is the last buffer of data for the document.
Return values
XML_STATUS_OKon success.
XML_STATUS_ERRORif 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.

◆ XML_ParseBuffer

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.

Parameters
[in]parserAn XML parser handle.
[in]lenThe number of bytes in buffer s.
[in]isFinalA flag indicating if this is the last buffer of data for the document.
Return values
XML_STATUS_OKon success.
XML_STATUS_ERRORif 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_ParserCreate_MM

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.

Parameters
[in]encodingThe encoding of the XML, or NULL if none specified.
[in]memsuiteA structure with allocation, reallocation, and free functions.
[in]namespaceSeparatorNamespace expanded element names and attribute names are returned as a concatenation of the namespace URI, namespaceSeparator, and the local part of the name.
Returns
An XML parser handle on success, or NULL on failure.
Note
Global Graphics recommends using memory allocation and free functions that allocate from the RIP or Skin's memory pools, such as SwAlloc() and SwFree() for RIP pools, or MemAlloc() and MemFree() for skin pools.

See the Expat API documentation for more details.

◆ XML_ParserFree

void( * sw_expat_api_20201221::XML_ParserFree) (XML_Parser parser)

Free an XML parser instance.

Parameters
[in]parserAn XML parser handle.

See the Expat API documentation for more details.

◆ XML_SetCdataSectionHandler

void( * sw_expat_api_20201221::XML_SetCdataSectionHandler) (XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end)

Set the CDATA section handler callbacks.

Parameters
[in]parserAn XML parser handle.
[in]startCDATA section start callback function. This function is called with user data only.
[in]endCDATA section end callback function. This function is called with user data only.

See the Expat API documentation for more details.

◆ XML_SetCharacterDataHandler

void( * sw_expat_api_20201221::XML_SetCharacterDataHandler) (XML_Parser parser, XML_CharacterDataHandler handler)

Set the CDATA handler callback.

Parameters
[in]parserAn XML parser handle.
[in]handlerCDATA 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.

◆ XML_SetCommentHandler

void( * sw_expat_api_20201221::XML_SetCommentHandler) (XML_Parser parser, XML_CommentHandler handler)

Set the XML comment handler callback.

Parameters
[in]parserAn XML parser handle.
[in]handlerComment callback function. This function is called with user data and a pointer to the comment.

See the Expat API documentation for more details.

◆ XML_SetDoctypeDeclHandler

void( * sw_expat_api_20201221::XML_SetDoctypeDeclHandler) (XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end)

Set the DOCTYPE declaration handler callbacks.

Parameters
[in]parserAn XML parser handle.
[in]startDocument 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]endDocument type end callback function. This function is called with user data only.

See the Expat API documentation for more details.

◆ XML_SetElementHandler

void( * sw_expat_api_20201221::XML_SetElementHandler) (XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end)

Set the element handler callbacks.

Parameters
[in]parserAn XML parser handle.
[in]startElement 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]endElement end callback function. This function is called with user data and the element name.

See the Expat API documentation for more details.

◆ XML_SetNamespaceDeclHandler

void( * sw_expat_api_20201221::XML_SetNamespaceDeclHandler) (XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end)

Set the namespace declaration handler callbacks.

Parameters
[in]parserAn XML parser handle.
[in]startNamespace start callback function. This function is called with user data, the namespace prefix, and the namespace URI.
[in]endNamespace end callback function. This function is called with user data and the namespace prefix.

See the Expat API documentation for more details.

◆ XML_SetProcessingInstructionHandler

void( * sw_expat_api_20201221::XML_SetProcessingInstructionHandler) (XML_Parser parser, XML_ProcessingInstructionHandler handler)

Set the XML processing instruction handler callback.

Parameters
[in]parserAn XML parser handle.
[in]handlerProcessing 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.

◆ XML_SetReturnNSTriplet

void( * sw_expat_api_20201221::XML_SetReturnNSTriplet) (XML_Parser parser, int do_nst)

Set the XML comment handler callback.

Parameters
[in]parserAn XML parser handle.
[in]do_nstA 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.

◆ XML_SetUserData

void( * sw_expat_api_20201221::XML_SetUserData) (XML_Parser parser, void *userData)

Set the user data pointer passed to callback functions.

Parameters
[in]parserAn XML parser handle.
[in]userDataThe user data pointer that is passed to callback functions.

See the Expat API documentation for more details.

◆ XML_SetXmlDeclHandler

void( * sw_expat_api_20201221::XML_SetXmlDeclHandler) (XML_Parser parser, XML_XmlDeclHandler xmldecl)

Set the XML declaration handler callback.

Parameters
[in]parserAn XML parser handle.
[in]xmldeclXML 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.

◆ XML_StopParser

enum XML_Status( * sw_expat_api_20201221::XML_StopParser) (XML_Parser parser, XML_Bool resumable)

Stop an XML parser.

Parameters
[in]parserAn XML parser handle.
[in]resumableXML_FALSE if aborting the parse, XML_TRUE if the parsing may be resumed later.
Return values
XML_STATUS_OKon success.
XML_STATUS_ERRORif there was an error.

See the Expat API documentation for more details.


The documentation for this struct was generated from the following file: