Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
expat.h File Reference
#include <stdlib.h>
#include "expat_external.h"

Go to the source code of this file.

Classes

struct  XML_cp
 
struct  XML_Memory_Handling_Suite
 
struct  XML_Encoding
 
struct  XML_ParsingStatus
 
struct  XML_Expat_Version
 
struct  XML_Feature
 

Macros

#define XML_TRUE   ((XML_Bool) 1)
 
#define XML_FALSE   ((XML_Bool) 0)
 
#define XML_STATUS_ERROR   XML_STATUS_ERROR
 
#define XML_STATUS_OK   XML_STATUS_OK
 
#define XML_STATUS_SUSPENDED   XML_STATUS_SUSPENDED
 
#define XML_GetUserData(parser)   (*(void **)(parser))
 
#define XML_GetErrorLineNumber   XML_GetCurrentLineNumber
 
#define XML_GetErrorColumnNumber   XML_GetCurrentColumnNumber
 
#define XML_GetErrorByteIndex   XML_GetCurrentByteIndex
 
#define XML_MAJOR_VERSION   2
 
#define XML_MINOR_VERSION   1
 
#define XML_MICRO_VERSION   0
 

Typedefs

typedef struct XML_ParserStructXML_Parser
 
typedef unsigned char XML_Bool
 
typedef struct XML_cp XML_Content
 
typedef void(XMLCALLXML_ElementDeclHandler) (void *userData, const XML_Char *name, XML_Content *model)
 
typedef void(XMLCALLXML_AttlistDeclHandler) (void *userData, const XML_Char *elname, const XML_Char *attname, const XML_Char *att_type, const XML_Char *dflt, int isrequired)
 
typedef void(XMLCALLXML_XmlDeclHandler) (void *userData, const XML_Char *version, const XML_Char *encoding, int standalone)
 
typedef void(XMLCALLXML_StartElementHandler) (void *userData, const XML_Char *name, const XML_Char **atts)
 
typedef void(XMLCALLXML_EndElementHandler) (void *userData, const XML_Char *name)
 
typedef void(XMLCALLXML_CharacterDataHandler) (void *userData, const XML_Char *s, int len)
 
typedef void(XMLCALLXML_ProcessingInstructionHandler) (void *userData, const XML_Char *target, const XML_Char *data)
 
typedef void(XMLCALLXML_CommentHandler) (void *userData, const XML_Char *data)
 
typedef void(XMLCALLXML_StartCdataSectionHandler) (void *userData)
 
typedef void(XMLCALLXML_EndCdataSectionHandler) (void *userData)
 
typedef void(XMLCALLXML_DefaultHandler) (void *userData, const XML_Char *s, int len)
 
typedef void(XMLCALLXML_StartDoctypeDeclHandler) (void *userData, const XML_Char *doctypeName, const XML_Char *sysid, const XML_Char *pubid, int has_internal_subset)
 
typedef void(XMLCALLXML_EndDoctypeDeclHandler) (void *userData)
 
typedef void(XMLCALLXML_EntityDeclHandler) (void *userData, const XML_Char *entityName, int is_parameter_entity, const XML_Char *value, int value_length, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName)
 
typedef void(XMLCALLXML_UnparsedEntityDeclHandler) (void *userData, const XML_Char *entityName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName)
 
typedef void(XMLCALLXML_NotationDeclHandler) (void *userData, const XML_Char *notationName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
 
typedef void(XMLCALLXML_StartNamespaceDeclHandler) (void *userData, const XML_Char *prefix, const XML_Char *uri)
 
typedef void(XMLCALLXML_EndNamespaceDeclHandler) (void *userData, const XML_Char *prefix)
 
typedef int(XMLCALLXML_NotStandaloneHandler) (void *userData)
 
typedef int(XMLCALLXML_ExternalEntityRefHandler) (XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
 
typedef void(XMLCALLXML_SkippedEntityHandler) (void *userData, const XML_Char *entityName, int is_parameter_entity)
 
typedef int(XMLCALLXML_UnknownEncodingHandler) (void *encodingHandlerData, const XML_Char *name, XML_Encoding *info)
 

Enumerations

enum  XML_Status {
  XML_STATUS_ERROR = 0 , XML_STATUS_ERROR = 0 , XML_STATUS_OK = 1 , XML_STATUS_OK = 1 ,
  XML_STATUS_SUSPENDED
}
 
enum  XML_Error {
  XML_ERROR_NONE , XML_ERROR_NO_MEMORY , XML_ERROR_SYNTAX , XML_ERROR_NO_ELEMENTS ,
  XML_ERROR_INVALID_TOKEN , XML_ERROR_UNCLOSED_TOKEN , XML_ERROR_PARTIAL_CHAR , XML_ERROR_TAG_MISMATCH ,
  XML_ERROR_DUPLICATE_ATTRIBUTE , XML_ERROR_JUNK_AFTER_DOC_ELEMENT , XML_ERROR_PARAM_ENTITY_REF , XML_ERROR_UNDEFINED_ENTITY ,
  XML_ERROR_RECURSIVE_ENTITY_REF , XML_ERROR_ASYNC_ENTITY , XML_ERROR_BAD_CHAR_REF , XML_ERROR_BINARY_ENTITY_REF ,
  XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF , XML_ERROR_MISPLACED_XML_PI , XML_ERROR_UNKNOWN_ENCODING , XML_ERROR_INCORRECT_ENCODING ,
  XML_ERROR_UNCLOSED_CDATA_SECTION , XML_ERROR_EXTERNAL_ENTITY_HANDLING , XML_ERROR_NOT_STANDALONE , XML_ERROR_UNEXPECTED_STATE ,
  XML_ERROR_ENTITY_DECLARED_IN_PE , XML_ERROR_FEATURE_REQUIRES_XML_DTD , XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING , XML_ERROR_UNBOUND_PREFIX ,
  XML_ERROR_UNDECLARING_PREFIX , XML_ERROR_INCOMPLETE_PE , XML_ERROR_XML_DECL , XML_ERROR_TEXT_DECL ,
  XML_ERROR_PUBLICID , XML_ERROR_SUSPENDED , XML_ERROR_NOT_SUSPENDED , XML_ERROR_ABORTED ,
  XML_ERROR_FINISHED , XML_ERROR_SUSPEND_PE , XML_ERROR_RESERVED_PREFIX_XML , XML_ERROR_RESERVED_PREFIX_XMLNS ,
  XML_ERROR_RESERVED_NAMESPACE_URI
}
 
enum  XML_Content_Type {
  XML_CTYPE_EMPTY = 1 , XML_CTYPE_ANY , XML_CTYPE_MIXED , XML_CTYPE_NAME ,
  XML_CTYPE_CHOICE , XML_CTYPE_SEQ
}
 
enum  XML_Content_Quant { XML_CQUANT_NONE , XML_CQUANT_OPT , XML_CQUANT_REP , XML_CQUANT_PLUS }
 
enum  XML_Parsing { XML_INITIALIZED , XML_PARSING , XML_FINISHED , XML_SUSPENDED }
 
enum  XML_ParamEntityParsing { XML_PARAM_ENTITY_PARSING_NEVER , XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE , XML_PARAM_ENTITY_PARSING_ALWAYS }
 
enum  XML_FeatureEnum {
  XML_FEATURE_END = 0 , XML_FEATURE_UNICODE , XML_FEATURE_UNICODE_WCHAR_T , XML_FEATURE_DTD ,
  XML_FEATURE_CONTEXT_BYTES , XML_FEATURE_MIN_SIZE , XML_FEATURE_SIZEOF_XML_CHAR , XML_FEATURE_SIZEOF_XML_LCHAR ,
  XML_FEATURE_NS , XML_FEATURE_LARGE_SIZE , XML_FEATURE_ATTR_INFO
}
 

Functions

 XML_SetElementDeclHandler (XML_Parser parser, XML_ElementDeclHandler eldecl)
 
 XML_SetAttlistDeclHandler (XML_Parser parser, XML_AttlistDeclHandler attdecl)
 
 XML_SetXmlDeclHandler (XML_Parser parser, XML_XmlDeclHandler xmldecl)
 
 XML_ParserCreate (const XML_Char *encoding)
 
 XML_ParserCreateNS (const XML_Char *encoding, XML_Char namespaceSeparator)
 
 XML_ParserCreate_MM (const XML_Char *encoding, const XML_Memory_Handling_Suite *memsuite, const XML_Char *namespaceSeparator)
 
 XML_ParserReset (XML_Parser parser, const XML_Char *encoding)
 
 XML_SetEntityDeclHandler (XML_Parser parser, XML_EntityDeclHandler handler)
 
 XML_SetElementHandler (XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end)
 
 XML_SetStartElementHandler (XML_Parser parser, XML_StartElementHandler handler)
 
 XML_SetEndElementHandler (XML_Parser parser, XML_EndElementHandler handler)
 
 XML_SetCharacterDataHandler (XML_Parser parser, XML_CharacterDataHandler handler)
 
 XML_SetProcessingInstructionHandler (XML_Parser parser, XML_ProcessingInstructionHandler handler)
 
 XML_SetCommentHandler (XML_Parser parser, XML_CommentHandler handler)
 
 XML_SetCdataSectionHandler (XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end)
 
 XML_SetStartCdataSectionHandler (XML_Parser parser, XML_StartCdataSectionHandler start)
 
 XML_SetEndCdataSectionHandler (XML_Parser parser, XML_EndCdataSectionHandler end)
 
 XML_SetDefaultHandler (XML_Parser parser, XML_DefaultHandler handler)
 
 XML_SetDefaultHandlerExpand (XML_Parser parser, XML_DefaultHandler handler)
 
 XML_SetDoctypeDeclHandler (XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end)
 
 XML_SetStartDoctypeDeclHandler (XML_Parser parser, XML_StartDoctypeDeclHandler start)
 
 XML_SetEndDoctypeDeclHandler (XML_Parser parser, XML_EndDoctypeDeclHandler end)
 
 XML_SetUnparsedEntityDeclHandler (XML_Parser parser, XML_UnparsedEntityDeclHandler handler)
 
 XML_SetNotationDeclHandler (XML_Parser parser, XML_NotationDeclHandler handler)
 
 XML_SetNamespaceDeclHandler (XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end)
 
 XML_SetStartNamespaceDeclHandler (XML_Parser parser, XML_StartNamespaceDeclHandler start)
 
 XML_SetEndNamespaceDeclHandler (XML_Parser parser, XML_EndNamespaceDeclHandler end)
 
 XML_SetNotStandaloneHandler (XML_Parser parser, XML_NotStandaloneHandler handler)
 
 XML_SetExternalEntityRefHandler (XML_Parser parser, XML_ExternalEntityRefHandler handler)
 
 XML_SetExternalEntityRefHandlerArg (XML_Parser parser, void *arg)
 
 XML_SetSkippedEntityHandler (XML_Parser parser, XML_SkippedEntityHandler handler)
 
 XML_SetUnknownEncodingHandler (XML_Parser parser, XML_UnknownEncodingHandler handler, void *encodingHandlerData)
 
 XML_DefaultCurrent (XML_Parser parser)
 
 XML_SetReturnNSTriplet (XML_Parser parser, int do_nst)
 
 XML_SetUserData (XML_Parser parser, void *userData)
 
 XML_SetEncoding (XML_Parser parser, const XML_Char *encoding)
 
 XML_UseParserAsHandlerArg (XML_Parser parser)
 
 XML_UseForeignDTD (XML_Parser parser, XML_Bool useDTD)
 
 XML_SetBase (XML_Parser parser, const XML_Char *base)
 
 XML_GetBase (XML_Parser parser)
 
 XML_GetSpecifiedAttributeCount (XML_Parser parser)
 
 XML_GetIdAttributeIndex (XML_Parser parser)
 
 XML_Parse (XML_Parser parser, const char *s, int len, int isFinal)
 
 XML_GetBuffer (XML_Parser parser, int len)
 
 XML_ParseBuffer (XML_Parser parser, int len, int isFinal)
 
 XML_StopParser (XML_Parser parser, XML_Bool resumable)
 
 XML_ResumeParser (XML_Parser parser)
 
 XML_GetParsingStatus (XML_Parser parser, XML_ParsingStatus *status)
 
 XML_ExternalEntityParserCreate (XML_Parser parser, const XML_Char *context, const XML_Char *encoding)
 
 XML_SetParamEntityParsing (XML_Parser parser, enum XML_ParamEntityParsing parsing)
 
 XML_SetHashSalt (XML_Parser parser, unsigned long hash_salt)
 
 XML_GetErrorCode (XML_Parser parser)
 
 XMLPARSEAPI (XML_Size) XML_GetCurrentLineNumber(XML_Parser parser)
 
 XMLPARSEAPI (XML_Index) XML_GetCurrentByteIndex(XML_Parser parser)
 
 XML_GetCurrentByteCount (XML_Parser parser)
 
 XML_GetInputContext (XML_Parser parser, int *offset, int *size)
 
 XML_FreeContentModel (XML_Parser parser, XML_Content *model)
 
 XML_MemMalloc (XML_Parser parser, size_t size)
 
 XML_MemRealloc (XML_Parser parser, void *ptr, size_t size)
 
 XML_MemFree (XML_Parser parser, void *ptr)
 
 XML_ParserFree (XML_Parser parser)
 
 XML_ErrorString (enum XML_Error code)
 
 XML_ExpatVersion (void)
 
 XML_ExpatVersionInfo (void)
 
 XML_GetFeatureList (void)
 

Macro Definition Documentation

◆ XML_FALSE

#define XML_FALSE   ((XML_Bool) 0)

Definition at line 30 of file expat.h.

◆ XML_GetErrorByteIndex

#define XML_GetErrorByteIndex   XML_GetCurrentByteIndex

Definition at line 968 of file expat.h.

◆ XML_GetErrorColumnNumber

#define XML_GetErrorColumnNumber   XML_GetCurrentColumnNumber

Definition at line 967 of file expat.h.

◆ XML_GetErrorLineNumber

#define XML_GetErrorLineNumber   XML_GetCurrentLineNumber

Definition at line 966 of file expat.h.

◆ XML_GetUserData

#define XML_GetUserData (   parser)    (*(void **)(parser))

Definition at line 674 of file expat.h.

◆ XML_MAJOR_VERSION

#define XML_MAJOR_VERSION   2

Definition at line 1039 of file expat.h.

◆ XML_MICRO_VERSION

#define XML_MICRO_VERSION   0

Definition at line 1041 of file expat.h.

◆ XML_MINOR_VERSION

#define XML_MINOR_VERSION   1

Definition at line 1040 of file expat.h.

◆ XML_STATUS_ERROR

#define XML_STATUS_ERROR   XML_STATUS_ERROR

Definition at line 47 of file expat.h.

◆ XML_STATUS_OK

#define XML_STATUS_OK   XML_STATUS_OK

Definition at line 49 of file expat.h.

◆ XML_STATUS_SUSPENDED

#define XML_STATUS_SUSPENDED   XML_STATUS_SUSPENDED

◆ XML_TRUE

#define XML_TRUE   ((XML_Bool) 1)

Definition at line 29 of file expat.h.

Typedef Documentation

◆ XML_AttlistDeclHandler

typedef void(XMLCALL * XML_AttlistDeclHandler) (void *userData, const XML_Char *elname, const XML_Char *attname, const XML_Char *att_type, const XML_Char *dflt, int isrequired)

Definition at line 166 of file expat.h.

◆ XML_Bool

typedef unsigned char XML_Bool

Definition at line 28 of file expat.h.

◆ XML_CharacterDataHandler

typedef void(XMLCALL * XML_CharacterDataHandler) (void *userData, const XML_Char *s, int len)

Definition at line 261 of file expat.h.

◆ XML_CommentHandler

typedef void(XMLCALL * XML_CommentHandler) (void *userData, const XML_Char *data)

Definition at line 272 of file expat.h.

◆ XML_Content

typedef struct XML_cp XML_Content

Definition at line 135 of file expat.h.

◆ XML_DefaultHandler

typedef void(XMLCALL * XML_DefaultHandler) (void *userData, const XML_Char *s, int len)

Definition at line 291 of file expat.h.

◆ XML_ElementDeclHandler

typedef void(XMLCALL * XML_ElementDeclHandler) (void *userData, const XML_Char *name, XML_Content *model)

Definition at line 150 of file expat.h.

◆ XML_EndCdataSectionHandler

typedef void(XMLCALL * XML_EndCdataSectionHandler) (void *userData)

Definition at line 276 of file expat.h.

◆ XML_EndDoctypeDeclHandler

typedef void(XMLCALL * XML_EndDoctypeDeclHandler) (void *userData)

Definition at line 309 of file expat.h.

◆ XML_EndElementHandler

typedef void(XMLCALL * XML_EndElementHandler) (void *userData, const XML_Char *name)

Definition at line 256 of file expat.h.

◆ XML_EndNamespaceDeclHandler

typedef void(XMLCALL * XML_EndNamespaceDeclHandler) (void *userData, const XML_Char *prefix)

Definition at line 383 of file expat.h.

◆ XML_EntityDeclHandler

typedef void(XMLCALL * XML_EntityDeclHandler) (void *userData, const XML_Char *entityName, int is_parameter_entity, const XML_Char *value, int value_length, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName)

Definition at line 329 of file expat.h.

◆ XML_ExternalEntityRefHandler

typedef int(XMLCALL * XML_ExternalEntityRefHandler) (XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)

Definition at line 432 of file expat.h.

◆ XML_NotationDeclHandler

typedef void(XMLCALL * XML_NotationDeclHandler) (void *userData, const XML_Char *notationName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)

Definition at line 365 of file expat.h.

◆ XML_NotStandaloneHandler

typedef int(XMLCALL * XML_NotStandaloneHandler) (void *userData)

Definition at line 396 of file expat.h.

◆ XML_Parser

typedef struct XML_ParserStruct* XML_Parser

Definition at line 25 of file expat.h.

◆ XML_ProcessingInstructionHandler

typedef void(XMLCALL * XML_ProcessingInstructionHandler) (void *userData, const XML_Char *target, const XML_Char *data)

Definition at line 266 of file expat.h.

◆ XML_SkippedEntityHandler

typedef void(XMLCALL * XML_SkippedEntityHandler) (void *userData, const XML_Char *entityName, int is_parameter_entity)

Definition at line 449 of file expat.h.

◆ XML_StartCdataSectionHandler

typedef void(XMLCALL * XML_StartCdataSectionHandler) (void *userData)

Definition at line 275 of file expat.h.

◆ XML_StartDoctypeDeclHandler

typedef void(XMLCALL * XML_StartDoctypeDeclHandler) (void *userData, const XML_Char *doctypeName, const XML_Char *sysid, const XML_Char *pubid, int has_internal_subset)

Definition at line 298 of file expat.h.

◆ XML_StartElementHandler

typedef void(XMLCALL * XML_StartElementHandler) (void *userData, const XML_Char *name, const XML_Char **atts)

Definition at line 252 of file expat.h.

◆ XML_StartNamespaceDeclHandler

typedef void(XMLCALL * XML_StartNamespaceDeclHandler) (void *userData, const XML_Char *prefix, const XML_Char *uri)

Definition at line 378 of file expat.h.

◆ XML_UnknownEncodingHandler

typedef int(XMLCALL * XML_UnknownEncodingHandler) (void *encodingHandlerData, const XML_Char *name, XML_Encoding *info)

Definition at line 528 of file expat.h.

◆ XML_UnparsedEntityDeclHandler

typedef void(XMLCALL * XML_UnparsedEntityDeclHandler) (void *userData, const XML_Char *entityName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName)

Definition at line 353 of file expat.h.

◆ XML_XmlDeclHandler

typedef void(XMLCALL * XML_XmlDeclHandler) (void *userData, const XML_Char *version, const XML_Char *encoding, int standalone)

Definition at line 186 of file expat.h.

Enumeration Type Documentation

◆ XML_Content_Quant

Enumerator
XML_CQUANT_NONE 
XML_CQUANT_OPT 
XML_CQUANT_REP 
XML_CQUANT_PLUS 

Definition at line 110 of file expat.h.

110 {
115};
@ XML_CQUANT_PLUS
Definition: expat.h:114
@ XML_CQUANT_OPT
Definition: expat.h:112
@ XML_CQUANT_NONE
Definition: expat.h:111
@ XML_CQUANT_REP
Definition: expat.h:113

◆ XML_Content_Type

Enumerator
XML_CTYPE_EMPTY 
XML_CTYPE_ANY 
XML_CTYPE_MIXED 
XML_CTYPE_NAME 
XML_CTYPE_CHOICE 
XML_CTYPE_SEQ 

Definition at line 101 of file expat.h.

101 {
102 XML_CTYPE_EMPTY = 1,
108};
@ XML_CTYPE_ANY
Definition: expat.h:103
@ XML_CTYPE_SEQ
Definition: expat.h:107
@ XML_CTYPE_MIXED
Definition: expat.h:104
@ XML_CTYPE_CHOICE
Definition: expat.h:106
@ XML_CTYPE_EMPTY
Definition: expat.h:102
@ XML_CTYPE_NAME
Definition: expat.h:105

◆ XML_Error

enum XML_Error
Enumerator
XML_ERROR_NONE 
XML_ERROR_NO_MEMORY 
XML_ERROR_SYNTAX 
XML_ERROR_NO_ELEMENTS 
XML_ERROR_INVALID_TOKEN 
XML_ERROR_UNCLOSED_TOKEN 
XML_ERROR_PARTIAL_CHAR 
XML_ERROR_TAG_MISMATCH 
XML_ERROR_DUPLICATE_ATTRIBUTE 
XML_ERROR_JUNK_AFTER_DOC_ELEMENT 
XML_ERROR_PARAM_ENTITY_REF 
XML_ERROR_UNDEFINED_ENTITY 
XML_ERROR_RECURSIVE_ENTITY_REF 
XML_ERROR_ASYNC_ENTITY 
XML_ERROR_BAD_CHAR_REF 
XML_ERROR_BINARY_ENTITY_REF 
XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF 
XML_ERROR_MISPLACED_XML_PI 
XML_ERROR_UNKNOWN_ENCODING 
XML_ERROR_INCORRECT_ENCODING 
XML_ERROR_UNCLOSED_CDATA_SECTION 
XML_ERROR_EXTERNAL_ENTITY_HANDLING 
XML_ERROR_NOT_STANDALONE 
XML_ERROR_UNEXPECTED_STATE 
XML_ERROR_ENTITY_DECLARED_IN_PE 
XML_ERROR_FEATURE_REQUIRES_XML_DTD 
XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING 
XML_ERROR_UNBOUND_PREFIX 
XML_ERROR_UNDECLARING_PREFIX 
XML_ERROR_INCOMPLETE_PE 
XML_ERROR_XML_DECL 
XML_ERROR_TEXT_DECL 
XML_ERROR_PUBLICID 
XML_ERROR_SUSPENDED 
XML_ERROR_NOT_SUSPENDED 
XML_ERROR_ABORTED 
XML_ERROR_FINISHED 
XML_ERROR_SUSPEND_PE 
XML_ERROR_RESERVED_PREFIX_XML 
XML_ERROR_RESERVED_PREFIX_XMLNS 
XML_ERROR_RESERVED_NAMESPACE_URI 

Definition at line 54 of file expat.h.

54 {
82 /* Added in 1.95.7. */
84 /* Added in 1.95.8. */
95 /* Added in 2.0. */
99};
@ XML_ERROR_UNCLOSED_TOKEN
Definition: expat.h:60
@ XML_ERROR_ASYNC_ENTITY
Definition: expat.h:68
@ XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF
Definition: expat.h:71
@ XML_ERROR_ABORTED
Definition: expat.h:92
@ XML_ERROR_XML_DECL
Definition: expat.h:87
@ XML_ERROR_NO_ELEMENTS
Definition: expat.h:58
@ XML_ERROR_NOT_STANDALONE
Definition: expat.h:77
@ XML_ERROR_INCOMPLETE_PE
Definition: expat.h:86
@ XML_ERROR_TEXT_DECL
Definition: expat.h:88
@ XML_ERROR_RECURSIVE_ENTITY_REF
Definition: expat.h:67
@ XML_ERROR_PARTIAL_CHAR
Definition: expat.h:61
@ XML_ERROR_SUSPENDED
Definition: expat.h:90
@ XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING
Definition: expat.h:81
@ XML_ERROR_ENTITY_DECLARED_IN_PE
Definition: expat.h:79
@ XML_ERROR_DUPLICATE_ATTRIBUTE
Definition: expat.h:63
@ XML_ERROR_EXTERNAL_ENTITY_HANDLING
Definition: expat.h:76
@ XML_ERROR_INCORRECT_ENCODING
Definition: expat.h:74
@ XML_ERROR_NO_MEMORY
Definition: expat.h:56
@ XML_ERROR_MISPLACED_XML_PI
Definition: expat.h:72
@ XML_ERROR_NONE
Definition: expat.h:55
@ XML_ERROR_PARAM_ENTITY_REF
Definition: expat.h:65
@ XML_ERROR_FEATURE_REQUIRES_XML_DTD
Definition: expat.h:80
@ XML_ERROR_RESERVED_PREFIX_XML
Definition: expat.h:96
@ XML_ERROR_UNEXPECTED_STATE
Definition: expat.h:78
@ XML_ERROR_TAG_MISMATCH
Definition: expat.h:62
@ XML_ERROR_FINISHED
Definition: expat.h:93
@ XML_ERROR_JUNK_AFTER_DOC_ELEMENT
Definition: expat.h:64
@ XML_ERROR_NOT_SUSPENDED
Definition: expat.h:91
@ XML_ERROR_UNCLOSED_CDATA_SECTION
Definition: expat.h:75
@ XML_ERROR_RESERVED_NAMESPACE_URI
Definition: expat.h:98
@ XML_ERROR_BAD_CHAR_REF
Definition: expat.h:69
@ XML_ERROR_UNDEFINED_ENTITY
Definition: expat.h:66
@ XML_ERROR_UNBOUND_PREFIX
Definition: expat.h:83
@ XML_ERROR_PUBLICID
Definition: expat.h:89
@ XML_ERROR_UNDECLARING_PREFIX
Definition: expat.h:85
@ XML_ERROR_INVALID_TOKEN
Definition: expat.h:59
@ XML_ERROR_BINARY_ENTITY_REF
Definition: expat.h:70
@ XML_ERROR_UNKNOWN_ENCODING
Definition: expat.h:73
@ XML_ERROR_SUSPEND_PE
Definition: expat.h:94
@ XML_ERROR_SYNTAX
Definition: expat.h:57
@ XML_ERROR_RESERVED_PREFIX_XMLNS
Definition: expat.h:97

◆ XML_FeatureEnum

Enumerator
XML_FEATURE_END 
XML_FEATURE_UNICODE 
XML_FEATURE_UNICODE_WCHAR_T 
XML_FEATURE_DTD 
XML_FEATURE_CONTEXT_BYTES 
XML_FEATURE_MIN_SIZE 
XML_FEATURE_SIZEOF_XML_CHAR 
XML_FEATURE_SIZEOF_XML_LCHAR 
XML_FEATURE_NS 
XML_FEATURE_LARGE_SIZE 
XML_FEATURE_ATTR_INFO 

Definition at line 1009 of file expat.h.

1009 {
1010 XML_FEATURE_END = 0,
1021 /* Additional features must be added to the end of this enum. */
1022};
@ XML_FEATURE_DTD
Definition: expat.h:1013
@ XML_FEATURE_SIZEOF_XML_LCHAR
Definition: expat.h:1017
@ XML_FEATURE_NS
Definition: expat.h:1018
@ XML_FEATURE_UNICODE
Definition: expat.h:1011
@ XML_FEATURE_SIZEOF_XML_CHAR
Definition: expat.h:1016
@ XML_FEATURE_MIN_SIZE
Definition: expat.h:1015
@ XML_FEATURE_END
Definition: expat.h:1010
@ XML_FEATURE_UNICODE_WCHAR_T
Definition: expat.h:1012
@ XML_FEATURE_CONTEXT_BYTES
Definition: expat.h:1014
@ XML_FEATURE_LARGE_SIZE
Definition: expat.h:1019
@ XML_FEATURE_ATTR_INFO
Definition: expat.h:1020

◆ XML_ParamEntityParsing

Enumerator
XML_PARAM_ENTITY_PARSING_NEVER 
XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE 
XML_PARAM_ENTITY_PARSING_ALWAYS 

Definition at line 876 of file expat.h.

876 {
880};
@ XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE
Definition: expat.h:878
@ XML_PARAM_ENTITY_PARSING_ALWAYS
Definition: expat.h:879
@ XML_PARAM_ENTITY_PARSING_NEVER
Definition: expat.h:877

◆ XML_Parsing

Enumerator
XML_INITIALIZED 
XML_PARSING 
XML_FINISHED 
XML_SUSPENDED 

Definition at line 835 of file expat.h.

835 {
840};
@ XML_PARSING
Definition: expat.h:837
@ XML_SUSPENDED
Definition: expat.h:839
@ XML_FINISHED
Definition: expat.h:838
@ XML_INITIALIZED
Definition: expat.h:836

◆ XML_Status

enum XML_Status
Enumerator
XML_STATUS_ERROR 
XML_STATUS_ERROR 
XML_STATUS_OK 
XML_STATUS_OK 
XML_STATUS_SUSPENDED 

Definition at line 45 of file expat.h.

45 {
47#define XML_STATUS_ERROR XML_STATUS_ERROR
48 XML_STATUS_OK = 1,
49#define XML_STATUS_OK XML_STATUS_OK
51#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
52};
#define XML_STATUS_ERROR
Definition: expat.h:47
#define XML_STATUS_SUSPENDED
#define XML_STATUS_OK
Definition: expat.h:49

Function Documentation

◆ XML_DefaultCurrent()

XML_DefaultCurrent ( XML_Parser  parser)

Definition at line 1920 of file xmlparse.cc.

1921{
1922 if (defaultHandler) {
1924 reportDefault(parser,
1926 openInternalEntities->internalEventPtr,
1927 openInternalEntities->internalEventEndPtr);
1928 else
1929 reportDefault(parser, encoding, eventPtr, eventEndPtr);
1930 }
1931}
#define eventPtr
Definition: xmlparse.cc:619
#define internalEncoding
Definition: xmlparse.cc:607
#define openInternalEntities
Definition: xmlparse.cc:623
#define defaultHandler
Definition: xmlparse.cc:583
#define eventEndPtr
Definition: xmlparse.cc:620

◆ XML_ErrorString()

XML_ErrorString ( enum XML_Error  code)

Definition at line 1934 of file xmlparse.cc.

1935{
1936 static const XML_LChar* const message[] = {
1937 0,
1938 XML_L("out of memory"),
1939 XML_L("syntax error"),
1940 XML_L("no element found"),
1941 XML_L("not well-formed (invalid token)"),
1942 XML_L("unclosed token"),
1943 XML_L("partial character"),
1944 XML_L("mismatched tag"),
1945 XML_L("duplicate attribute"),
1946 XML_L("junk after document element"),
1947 XML_L("illegal parameter entity reference"),
1948 XML_L("undefined entity"),
1949 XML_L("recursive entity reference"),
1950 XML_L("asynchronous entity"),
1951 XML_L("reference to invalid character number"),
1952 XML_L("reference to binary entity"),
1953 XML_L("reference to external entity in attribute"),
1954 XML_L("XML or text declaration not at start of entity"),
1955 XML_L("unknown encoding"),
1956 XML_L("encoding specified in XML declaration is incorrect"),
1957 XML_L("unclosed CDATA section"),
1958 XML_L("error in processing external entity reference"),
1959 XML_L("document is not standalone"),
1960 XML_L("unexpected parser state - please send a bug report"),
1961 XML_L("entity declared in parameter entity"),
1962 XML_L("requested feature requires XML_DTD support in Expat"),
1963 XML_L("cannot change setting once parsing has begun"),
1964 XML_L("unbound prefix"),
1965 XML_L("must not undeclare prefix"),
1966 XML_L("incomplete markup in parameter entity"),
1967 XML_L("XML declaration not well-formed"),
1968 XML_L("text declaration not well-formed"),
1969 XML_L("illegal character(s) in public id"),
1970 XML_L("parser suspended"),
1971 XML_L("parser not suspended"),
1972 XML_L("parsing aborted"),
1973 XML_L("parsing finished"),
1974 XML_L("cannot suspend in external parameter entity"),
1975 XML_L("reserved prefix (xml) must not be undeclared or bound to another namespace name"),
1976 XML_L("reserved prefix (xmlns) must not be declared or undeclared"),
1977 XML_L("prefix must not be bound to one of the reserved namespace names")
1978 };
1979 if (code > 0 && code < sizeof(message)/sizeof(message[0]))
1980 return message[code];
1981 return NULL;
1982}
char XML_LChar
Definition: inftrees.h:24
#define XML_L(x)
Definition: xmlparse.cc:77

◆ XML_ExpatVersion()

XML_ExpatVersion ( void  )

Definition at line 1985 of file xmlparse.cc.

1985 {
1986
1987 /* V1 is used to string-ize the version number. However, it would
1988 string-ize the actual version macro *names* unless we get them
1989 substituted before being passed to V1. CPP is defined to expand
1990 a macro, then rescan for more expansions. Thus, we use V2 to expand
1991 the version macros, then CPP will expand the resulting V1() macro
1992 with the correct numerals. */
1993 /* ### I'm assuming cpp is portable in this respect... */
1994
1995#define V1(a,b,c) XML_L(#a)XML_L(".")XML_L(#b)XML_L(".")XML_L(#c)
1996#define V2(a,b,c) XML_L("expat_")V1(a,b,c)
1997
1999
2000#undef V1
2001#undef V2
2002}
#define XML_MAJOR_VERSION
Definition: expat.h:1039
#define XML_MINOR_VERSION
Definition: expat.h:1040
#define XML_MICRO_VERSION
Definition: expat.h:1041
#define V2(a, b, c)

◆ XML_ExpatVersionInfo()

XML_ExpatVersionInfo ( void  )

Definition at line 2005 of file xmlparse.cc.

2006{
2007 XML_Expat_Version version;
2008
2009 version.major = XML_MAJOR_VERSION;
2010 version.minor = XML_MINOR_VERSION;
2011 version.micro = XML_MICRO_VERSION;
2012
2013 return version;
2014}

◆ XML_ExternalEntityParserCreate()

XML_ExternalEntityParserCreate ( XML_Parser  parser,
const XML_Char context,
const XML_Char encoding 
)

Definition at line 986 of file xmlparse.cc.

989{
990 XML_Parser parser = oldParser;
991 DTD *newDtd = NULL;
992 DTD *oldDtd = _dtd;
993 XML_StartElementHandler oldStartElementHandler = startElementHandler;
994 XML_EndElementHandler oldEndElementHandler = endElementHandler;
995 XML_CharacterDataHandler oldCharacterDataHandler = characterDataHandler;
996 XML_ProcessingInstructionHandler oldProcessingInstructionHandler
998 XML_CommentHandler oldCommentHandler = commentHandler;
999 XML_StartCdataSectionHandler oldStartCdataSectionHandler
1001 XML_EndCdataSectionHandler oldEndCdataSectionHandler
1003 XML_DefaultHandler oldDefaultHandler = defaultHandler;
1004 XML_UnparsedEntityDeclHandler oldUnparsedEntityDeclHandler
1006 XML_NotationDeclHandler oldNotationDeclHandler = notationDeclHandler;
1007 XML_StartNamespaceDeclHandler oldStartNamespaceDeclHandler
1009 XML_EndNamespaceDeclHandler oldEndNamespaceDeclHandler
1011 XML_NotStandaloneHandler oldNotStandaloneHandler = notStandaloneHandler;
1012 XML_ExternalEntityRefHandler oldExternalEntityRefHandler
1014 XML_SkippedEntityHandler oldSkippedEntityHandler = skippedEntityHandler;
1015 XML_UnknownEncodingHandler oldUnknownEncodingHandler
1017 XML_ElementDeclHandler oldElementDeclHandler = elementDeclHandler;
1018 XML_AttlistDeclHandler oldAttlistDeclHandler = attlistDeclHandler;
1019 XML_EntityDeclHandler oldEntityDeclHandler = entityDeclHandler;
1020 XML_XmlDeclHandler oldXmlDeclHandler = xmlDeclHandler;
1021 ELEMENT_TYPE * oldDeclElementType = declElementType;
1022
1023 void *oldUserData = userData;
1024 void *oldHandlerArg = handlerArg;
1025 XML_Bool oldDefaultExpandInternalEntities = defaultExpandInternalEntities;
1026 XML_Parser oldExternalEntityRefHandlerArg = externalEntityRefHandlerArg;
1027#ifdef XML_DTD
1028 enum XML_ParamEntityParsing oldParamEntityParsing = paramEntityParsing;
1029 int oldInEntityValue = prologState.inEntityValue;
1030#endif
1031 XML_Bool oldns_triplets = ns_triplets;
1032 /* Note that the new parser shares the same hash secret as the old
1033 parser, so that dtdCopy and copyEntityTable can lookup values
1034 from hash tables associated with either parser without us having
1035 to worry which hash secrets each table has.
1036 */
1037 unsigned long oldhash_secret_salt = hash_secret_salt;
1038
1039#ifdef XML_DTD
1040 if (!context)
1041 newDtd = oldDtd;
1042#endif /* XML_DTD */
1043
1044 /* Note that the magical uses of the pre-processor to make field
1045 access look more like C++ require that `parser' be overwritten
1046 here. This makes this function more painful to follow than it
1047 would be otherwise.
1048 */
1049 if (ns) {
1050 XML_Char tmp[2];
1051 *tmp = namespaceSeparator;
1052 parser = parserCreate(encodingName, &parser->m_mem, tmp, newDtd);
1053 }
1054 else {
1055 parser = parserCreate(encodingName, &parser->m_mem, NULL, newDtd);
1056 }
1057
1058 if (!parser)
1059 return NULL;
1060
1061 startElementHandler = oldStartElementHandler;
1062 endElementHandler = oldEndElementHandler;
1063 characterDataHandler = oldCharacterDataHandler;
1064 processingInstructionHandler = oldProcessingInstructionHandler;
1065 commentHandler = oldCommentHandler;
1066 startCdataSectionHandler = oldStartCdataSectionHandler;
1067 endCdataSectionHandler = oldEndCdataSectionHandler;
1068 defaultHandler = oldDefaultHandler;
1069 unparsedEntityDeclHandler = oldUnparsedEntityDeclHandler;
1070 notationDeclHandler = oldNotationDeclHandler;
1071 startNamespaceDeclHandler = oldStartNamespaceDeclHandler;
1072 endNamespaceDeclHandler = oldEndNamespaceDeclHandler;
1073 notStandaloneHandler = oldNotStandaloneHandler;
1074 externalEntityRefHandler = oldExternalEntityRefHandler;
1075 skippedEntityHandler = oldSkippedEntityHandler;
1076 unknownEncodingHandler = oldUnknownEncodingHandler;
1077 elementDeclHandler = oldElementDeclHandler;
1078 attlistDeclHandler = oldAttlistDeclHandler;
1079 entityDeclHandler = oldEntityDeclHandler;
1080 xmlDeclHandler = oldXmlDeclHandler;
1081 declElementType = oldDeclElementType;
1082 userData = oldUserData;
1083 if (oldUserData == oldHandlerArg)
1085 else
1086 handlerArg = parser;
1087 if (oldExternalEntityRefHandlerArg != oldParser)
1088 externalEntityRefHandlerArg = oldExternalEntityRefHandlerArg;
1089 defaultExpandInternalEntities = oldDefaultExpandInternalEntities;
1090 ns_triplets = oldns_triplets;
1091 hash_secret_salt = oldhash_secret_salt;
1092 parentParser = oldParser;
1093#ifdef XML_DTD
1094 paramEntityParsing = oldParamEntityParsing;
1095 prologState.inEntityValue = oldInEntityValue;
1096 if (context) {
1097#endif /* XML_DTD */
1098 if (!dtdCopy(oldParser, _dtd, oldDtd, &parser->m_mem)
1099 || !setContext(parser, context)) {
1100 XML_ParserFree(parser);
1101 return NULL;
1102 }
1103 processor = externalEntityInitProcessor;
1104#ifdef XML_DTD
1105 }
1106 else {
1107 /* The DTD instance referenced by _dtd is shared between the document's
1108 root parser and external PE parsers, therefore one does not need to
1109 call setContext. In addition, one also *must* not call setContext,
1110 because this would overwrite existing prefix->binding pointers in
1111 _dtd with ones that get destroyed with the external PE parser.
1112 This would leave those prefixes with dangling pointers.
1113 */
1114 isParamEntity = XML_TRUE;
1115 XmlPrologStateInitExternalEntity(&prologState);
1116 processor = externalParEntInitProcessor;
1117 }
1118#endif /* XML_DTD */
1119 return parser;
1120}
void(XMLCALL * XML_CommentHandler)(void *userData, const XML_Char *data)
Definition: expat.h:272
void(XMLCALL * XML_EndElementHandler)(void *userData, const XML_Char *name)
Definition: expat.h:256
void(XMLCALL * XML_EndNamespaceDeclHandler)(void *userData, const XML_Char *prefix)
Definition: expat.h:383
void(XMLCALL * XML_SkippedEntityHandler)(void *userData, const XML_Char *entityName, int is_parameter_entity)
Definition: expat.h:449
int(XMLCALL * XML_ExternalEntityRefHandler)(XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition: expat.h:432
void(XMLCALL * XML_EndCdataSectionHandler)(void *userData)
Definition: expat.h:276
int(XMLCALL * XML_UnknownEncodingHandler)(void *encodingHandlerData, const XML_Char *name, XML_Encoding *info)
Definition: expat.h:528
void(XMLCALL * XML_StartElementHandler)(void *userData, const XML_Char *name, const XML_Char **atts)
Definition: expat.h:252
void(XMLCALL * XML_ProcessingInstructionHandler)(void *userData, const XML_Char *target, const XML_Char *data)
Definition: expat.h:266
void(XMLCALL * XML_StartNamespaceDeclHandler)(void *userData, const XML_Char *prefix, const XML_Char *uri)
Definition: expat.h:378
unsigned char XML_Bool
Definition: expat.h:28
void(XMLCALL * XML_XmlDeclHandler)(void *userData, const XML_Char *version, const XML_Char *encoding, int standalone)
Definition: expat.h:186
void(XMLCALL * XML_StartCdataSectionHandler)(void *userData)
Definition: expat.h:275
void(XMLCALL * XML_UnparsedEntityDeclHandler)(void *userData, const XML_Char *entityName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName)
Definition: expat.h:353
XML_ParamEntityParsing
Definition: expat.h:876
void(XMLCALL * XML_AttlistDeclHandler)(void *userData, const XML_Char *elname, const XML_Char *attname, const XML_Char *att_type, const XML_Char *dflt, int isrequired)
Definition: expat.h:166
int(XMLCALL * XML_NotStandaloneHandler)(void *userData)
Definition: expat.h:396
#define XML_TRUE
Definition: expat.h:29
void(XMLCALL * XML_CharacterDataHandler)(void *userData, const XML_Char *s, int len)
Definition: expat.h:261
void(XMLCALL * XML_EntityDeclHandler)(void *userData, const XML_Char *entityName, int is_parameter_entity, const XML_Char *value, int value_length, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName)
Definition: expat.h:329
void(XMLCALL * XML_NotationDeclHandler)(void *userData, const XML_Char *notationName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
Definition: expat.h:365
void(XMLCALL * XML_DefaultHandler)(void *userData, const XML_Char *s, int len)
Definition: expat.h:291
void(XMLCALL * XML_ElementDeclHandler)(void *userData, const XML_Char *name, XML_Content *model)
Definition: expat.h:150
char XML_Char
Definition: xmlparse.cc:268
const XML_Memory_Handling_Suite m_mem
Definition: xmlparse.cc:471
#define externalEntityRefHandlerArg
Definition: xmlparse.cc:595
#define defaultExpandInternalEntities
Definition: xmlparse.cc:625
#define endCdataSectionHandler
Definition: xmlparse.cc:582
#define processingInstructionHandler
Definition: xmlparse.cc:577
#define skippedEntityHandler
Definition: xmlparse.cc:599
#define elementDeclHandler
Definition: xmlparse.cc:601
#define declElementType
Definition: xmlparse.cc:645
#define notationDeclHandler
Definition: xmlparse.cc:588
#define unknownEncodingHandler
Definition: xmlparse.cc:600
#define commentHandler
Definition: xmlparse.cc:579
#define userData
Definition: xmlparse.cc:572
#define xmlDeclHandler
Definition: xmlparse.cc:604
#define startCdataSectionHandler
Definition: xmlparse.cc:580
#define externalEntityRefHandler
Definition: xmlparse.cc:593
#define endElementHandler
Definition: xmlparse.cc:575
#define ns_triplets
Definition: xmlparse.cc:615
#define namespaceSeparator
Definition: xmlparse.cc:665
#define startNamespaceDeclHandler
Definition: xmlparse.cc:589
#define startElementHandler
Definition: xmlparse.cc:574
#define parentParser
Definition: xmlparse.cc:666
#define handlerArg
Definition: xmlparse.cc:573
#define entityDeclHandler
Definition: xmlparse.cc:603
#define notStandaloneHandler
Definition: xmlparse.cc:592
#define attlistDeclHandler
Definition: xmlparse.cc:602
#define ns
Definition: xmlparse.cc:614
#define _dtd
Definition: xmlparse.cc:636
#define endNamespaceDeclHandler
Definition: xmlparse.cc:591
#define unparsedEntityDeclHandler
Definition: xmlparse.cc:586
#define hash_secret_salt
Definition: xmlparse.cc:674
#define processor
Definition: xmlparse.cc:617
#define characterDataHandler
Definition: xmlparse.cc:576
#define prologState
Definition: xmlparse.cc:616
void XMLCALL XML_ParserFree(XML_Parser parser)
Definition: xmlparse.cc:1136

◆ XML_FreeContentModel()

XML_FreeContentModel ( XML_Parser  parser,
XML_Content model 
)

Definition at line 1896 of file xmlparse.cc.

1897{
1898 FREE(model);
1899}
#define FREE(p)
Definition: xmlparse.cc:570

◆ XML_GetBase()

XML_GetBase ( XML_Parser  parser)

Definition at line 1253 of file xmlparse.cc.

1254{
1255 return curBase;
1256}
#define curBase
Definition: xmlparse.cc:637

◆ XML_GetBuffer()

XML_GetBuffer ( XML_Parser  parser,
int  len 
)

Definition at line 1685 of file xmlparse.cc.

1686{
1687 switch (ps_parsing) {
1688 case XML_SUSPENDED:
1690 return NULL;
1691 case XML_FINISHED:
1693 return NULL;
1694 default: ;
1695 }
1696
1697 if (len > bufferLim - bufferEnd) {
1698 /* FIXME avoid integer overflow */
1699 int neededSize = len + (int)(bufferEnd - bufferPtr);
1700#ifdef XML_CONTEXT_BYTES
1701 int keep = (int)(bufferPtr - buffer);
1702
1703 if (keep > XML_CONTEXT_BYTES)
1704 keep = XML_CONTEXT_BYTES;
1705 neededSize += keep;
1706#endif /* defined XML_CONTEXT_BYTES */
1707 if (neededSize <= bufferLim - buffer) {
1708#ifdef XML_CONTEXT_BYTES
1709 if (keep < bufferPtr - buffer) {
1710 int offset = (int)(bufferPtr - buffer) - keep;
1711 memmove(buffer, &buffer[offset], bufferEnd - bufferPtr + keep);
1712 bufferEnd -= offset;
1713 bufferPtr -= offset;
1714 }
1715#else
1716 memmove(buffer, bufferPtr, bufferEnd - bufferPtr);
1718 bufferPtr = buffer;
1719#endif /* not defined XML_CONTEXT_BYTES */
1720 }
1721 else {
1722 char *newBuf;
1723 int bufferSize = (int)(bufferLim - bufferPtr);
1724 if (bufferSize == 0)
1725 bufferSize = INIT_BUFFER_SIZE;
1726 do {
1727 bufferSize *= 2;
1728 } while (bufferSize < neededSize);
1729 newBuf = (char *)MALLOC(bufferSize);
1730 if (newBuf == 0) {
1732 return NULL;
1733 }
1734 bufferLim = newBuf + bufferSize;
1735#ifdef XML_CONTEXT_BYTES
1736 if (bufferPtr) {
1737 int keep = (int)(bufferPtr - buffer);
1738 if (keep > XML_CONTEXT_BYTES)
1739 keep = XML_CONTEXT_BYTES;
1740 memcpy(newBuf, &bufferPtr[-keep], bufferEnd - bufferPtr + keep);
1741 FREE(buffer);
1742 buffer = newBuf;
1743 bufferEnd = buffer + (bufferEnd - bufferPtr) + keep;
1744 bufferPtr = buffer + keep;
1745 }
1746 else {
1747 bufferEnd = newBuf + (bufferEnd - bufferPtr);
1748 bufferPtr = buffer = newBuf;
1749 }
1750#else
1751 if (bufferPtr) {
1752 memcpy(newBuf, bufferPtr, bufferEnd - bufferPtr);
1753 FREE(buffer);
1754 }
1755 bufferEnd = newBuf + (bufferEnd - bufferPtr);
1756 bufferPtr = buffer = newBuf;
1757#endif /* not defined XML_CONTEXT_BYTES */
1758 }
1759 eventPtr = eventEndPtr = NULL;
1760 positionPtr = NULL;
1761 }
1762 return bufferEnd;
1763}
#define XML_CONTEXT_BYTES
Definition: amigaconfig.h:24
#define INIT_BUFFER_SIZE
Definition: xmlparse.cc:146
#define bufferEnd
Definition: xmlparse.cc:630
#define bufferLim
Definition: xmlparse.cc:633
#define ps_parsing
Definition: xmlparse.cc:667
#define buffer
Definition: xmlparse.cc:628
#define MALLOC(s)
Definition: xmlparse.cc:568
#define errorCode
Definition: xmlparse.cc:618
#define positionPtr
Definition: xmlparse.cc:621
#define bufferPtr
Definition: xmlparse.cc:629

Referenced by XML_Parse().

◆ XML_GetCurrentByteCount()

XML_GetCurrentByteCount ( XML_Parser  parser)

Definition at line 1855 of file xmlparse.cc.

1856{
1857 if (eventEndPtr && eventPtr)
1858 return (int)(eventEndPtr - eventPtr);
1859 return 0;
1860}

◆ XML_GetErrorCode()

XML_GetErrorCode ( XML_Parser  parser)

Definition at line 1841 of file xmlparse.cc.

1842{
1843 return errorCode;
1844}

◆ XML_GetFeatureList()

XML_GetFeatureList ( void  )

Definition at line 2017 of file xmlparse.cc.

2018{
2019 static const XML_Feature features[] = {
2020 {XML_FEATURE_SIZEOF_XML_CHAR, XML_L("sizeof(XML_Char)"),
2021 sizeof(XML_Char)},
2022 {XML_FEATURE_SIZEOF_XML_LCHAR, XML_L("sizeof(XML_LChar)"),
2023 sizeof(XML_LChar)},
2024#ifdef XML_UNICODE
2025 {XML_FEATURE_UNICODE, XML_L("XML_UNICODE"), 0},
2026#endif
2027#ifdef XML_UNICODE_WCHAR_T
2028 {XML_FEATURE_UNICODE_WCHAR_T, XML_L("XML_UNICODE_WCHAR_T"), 0},
2029#endif
2030#ifdef XML_DTD
2031 {XML_FEATURE_DTD, XML_L("XML_DTD"), 0},
2032#endif
2033#ifdef XML_CONTEXT_BYTES
2034 {XML_FEATURE_CONTEXT_BYTES, XML_L("XML_CONTEXT_BYTES"),
2036#endif
2037#ifdef XML_MIN_SIZE
2038 {XML_FEATURE_MIN_SIZE, XML_L("XML_MIN_SIZE"), 0},
2039#endif
2040#ifdef XML_NS
2041 {XML_FEATURE_NS, XML_L("XML_NS"), 0},
2042#endif
2043#ifdef XML_LARGE_SIZE
2044 {XML_FEATURE_LARGE_SIZE, XML_L("XML_LARGE_SIZE"), 0},
2045#endif
2046#ifdef XML_ATTR_INFO
2047 {XML_FEATURE_ATTR_INFO, XML_L("XML_ATTR_INFO"), 0},
2048#endif
2049 {XML_FEATURE_END, NULL, 0}
2050 };
2051
2052 return features;
2053}
#define XML_Char

◆ XML_GetIdAttributeIndex()

XML_GetIdAttributeIndex ( XML_Parser  parser)

Definition at line 1265 of file xmlparse.cc.

1266{
1267 return idAttIndex;
1268}
#define idAttIndex
Definition: xmlparse.cc:656

◆ XML_GetInputContext()

XML_GetInputContext ( XML_Parser  parser,
int *  offset,
int *  size 
)

Definition at line 1863 of file xmlparse.cc.

1864{
1865#ifdef XML_CONTEXT_BYTES
1866 if (eventPtr && buffer) {
1867 *offset = (int)(eventPtr - buffer);
1868 *size = (int)(bufferEnd - buffer);
1869 return buffer;
1870 }
1871#endif /* defined XML_CONTEXT_BYTES */
1872 return (char *) 0;
1873}

◆ XML_GetParsingStatus()

XML_GetParsingStatus ( XML_Parser  parser,
XML_ParsingStatus status 
)

Definition at line 1834 of file xmlparse.cc.

1835{
1836 assert(status != NULL);
1837 *status = parser->m_parsingStatus;
1838}
XML_ParsingStatus m_parsingStatus
Definition: xmlparse.cc:559

◆ XML_GetSpecifiedAttributeCount()

XML_GetSpecifiedAttributeCount ( XML_Parser  parser)

Definition at line 1259 of file xmlparse.cc.

1260{
1261 return nSpecifiedAtts;
1262}
#define nSpecifiedAtts
Definition: xmlparse.cc:655

◆ XML_MemFree()

XML_MemFree ( XML_Parser  parser,
void *  ptr 
)

Definition at line 1914 of file xmlparse.cc.

1915{
1916 FREE(ptr);
1917}

◆ XML_MemMalloc()

XML_MemMalloc ( XML_Parser  parser,
size_t  size 
)

Definition at line 1902 of file xmlparse.cc.

1903{
1904 return MALLOC(size);
1905}

◆ XML_MemRealloc()

XML_MemRealloc ( XML_Parser  parser,
void *  ptr,
size_t  size 
)

Definition at line 1908 of file xmlparse.cc.

1909{
1910 return REALLOC(ptr, size);
1911}
#define REALLOC(p, s)
Definition: xmlparse.cc:569

◆ XML_Parse()

XML_Parse ( XML_Parser  parser,
const char *  s,
int  len,
int  isFinal 
)

Definition at line 1506 of file xmlparse.cc.

1507{
1508 switch (ps_parsing) {
1509 case XML_SUSPENDED:
1511 return XML_STATUS_ERROR;
1512 case XML_FINISHED:
1514 return XML_STATUS_ERROR;
1515 case XML_INITIALIZED:
1516 if (parentParser == NULL && !startParsing(parser)) {
1518 return XML_STATUS_ERROR;
1519 }
1520 default:
1522 }
1523
1524 if (len == 0) {
1525 ps_finalBuffer = (XML_Bool)isFinal;
1526 if (!isFinal)
1527 return XML_STATUS_OK;
1530
1531 /* If data are left over from last buffer, and we now know that these
1532 data are the final chunk of input, then we have to check them again
1533 to detect errors based on that fact.
1534 */
1536
1537 if (errorCode == XML_ERROR_NONE) {
1538 switch (ps_parsing) {
1539 case XML_SUSPENDED:
1542 return XML_STATUS_SUSPENDED;
1543 case XML_INITIALIZED:
1544 case XML_PARSING:
1546 /* fall through */
1547 default:
1548 return XML_STATUS_OK;
1549 }
1550 }
1552 processor = errorProcessor;
1553 return XML_STATUS_ERROR;
1554 }
1555#ifndef XML_CONTEXT_BYTES
1556 else if (bufferPtr == bufferEnd) {
1557 const char *end;
1558 int nLeftOver;
1559 enum XML_Error result;
1560 parseEndByteIndex += len;
1561 positionPtr = s;
1562 ps_finalBuffer = (XML_Bool)isFinal;
1563
1564 errorCode = processor(parser, s, parseEndPtr = s + len, &end);
1565
1566 if (errorCode != XML_ERROR_NONE) {
1568 processor = errorProcessor;
1569 return XML_STATUS_ERROR;
1570 }
1571 else {
1572 switch (ps_parsing) {
1573 case XML_SUSPENDED:
1574 result = XML_STATUS_SUSPENDED;
1575 break;
1576 case XML_INITIALIZED:
1577 case XML_PARSING:
1578 if (isFinal) {
1580 return XML_STATUS_OK;
1581 }
1582 /* fall through */
1583 default:
1584 result = XML_STATUS_OK;
1585 }
1586 }
1587
1589 nLeftOver = s + len - end;
1590 if (nLeftOver) {
1591 if (buffer == NULL || nLeftOver > bufferLim - buffer) {
1592 /* FIXME avoid integer overflow */
1593 char *temp;
1594 temp = (buffer == NULL
1595 ? (char *)MALLOC(len * 2)
1596 : (char *)REALLOC(buffer, len * 2));
1597 if (temp == NULL) {
1599 eventPtr = eventEndPtr = NULL;
1600 processor = errorProcessor;
1601 return XML_STATUS_ERROR;
1602 }
1603 buffer = temp;
1604 bufferLim = buffer + len * 2;
1605 }
1606 memcpy(buffer, end, nLeftOver);
1607 }
1608 bufferPtr = buffer;
1609 bufferEnd = buffer + nLeftOver;
1614 return result;
1615 }
1616#endif /* not defined XML_CONTEXT_BYTES */
1617 else {
1618 void *buff = XML_GetBuffer(parser, len);
1619 if (buff == NULL)
1620 return XML_STATUS_ERROR;
1621 else {
1622 memcpy(buff, s, len);
1623 return XML_ParseBuffer(parser, len, isFinal);
1624 }
1625 }
1626}
XML_Error
Definition: expat.h:54
#define ps_finalBuffer
Definition: xmlparse.cc:668
#define parseEndPtr
Definition: xmlparse.cc:632
void *XMLCALL XML_GetBuffer(XML_Parser parser, int len)
Definition: xmlparse.cc:1685
#define parseEndByteIndex
Definition: xmlparse.cc:631
enum XML_Status XMLCALL XML_ParseBuffer(XML_Parser parser, int len, int isFinal)
Definition: xmlparse.cc:1629
#define XmlUpdatePosition(enc, ptr, end, pos)
Definition: xmltok.h:247

◆ XML_ParseBuffer()

XML_ParseBuffer ( XML_Parser  parser,
int  len,
int  isFinal 
)

Definition at line 1629 of file xmlparse.cc.

1630{
1631 const char *start;
1632 enum XML_Status result = XML_STATUS_OK;
1633
1634 switch (ps_parsing) {
1635 case XML_SUSPENDED:
1637 return XML_STATUS_ERROR;
1638 case XML_FINISHED:
1640 return XML_STATUS_ERROR;
1641 case XML_INITIALIZED:
1642 if (parentParser == NULL && !startParsing(parser)) {
1644 return XML_STATUS_ERROR;
1645 }
1646 default:
1648 }
1649
1650 start = bufferPtr;
1651 positionPtr = start;
1652 bufferEnd += len;
1654 parseEndByteIndex += len;
1655 ps_finalBuffer = (XML_Bool)isFinal;
1656
1657 errorCode = processor(parser, start, parseEndPtr, &bufferPtr);
1658
1659 if (errorCode != XML_ERROR_NONE) {
1661 processor = errorProcessor;
1662 return XML_STATUS_ERROR;
1663 }
1664 else {
1665 switch (ps_parsing) {
1666 case XML_SUSPENDED:
1667 result = XML_STATUS_SUSPENDED;
1668 break;
1669 case XML_INITIALIZED:
1670 case XML_PARSING:
1671 if (isFinal) {
1673 return result;
1674 }
1675 default: ; /* should not happen */
1676 }
1677 }
1678
1681 return result;
1682}
XML_Status
Definition: expat.h:45

Referenced by XML_Parse().

◆ XML_ParserCreate()

XML_ParserCreate ( const XML_Char encoding)

Definition at line 677 of file xmlparse.cc.

678{
679 return XML_ParserCreate_MM(encodingName, NULL, NULL);
680}
XML_Parser XMLCALL XML_ParserCreate_MM(const XML_Char *encodingName, const XML_Memory_Handling_Suite *memsuite, const XML_Char *nameSep)
Definition: xmlparse.cc:723

◆ XML_ParserCreate_MM()

XML_ParserCreate_MM ( const XML_Char encoding,
const XML_Memory_Handling_Suite memsuite,
const XML_Char namespaceSeparator 
)

Definition at line 723 of file xmlparse.cc.

726{
727 return parserCreate(encodingName, memsuite, nameSep, NULL);
728}

Referenced by XML_ParserCreate(), and XML_ParserCreateNS().

◆ XML_ParserCreateNS()

XML_ParserCreateNS ( const XML_Char encoding,
XML_Char  namespaceSeparator 
)

Definition at line 683 of file xmlparse.cc.

684{
685 XML_Char tmp[2];
686 *tmp = nsSep;
687 return XML_ParserCreate_MM(encodingName, NULL, tmp);
688}

◆ XML_ParserFree()

XML_ParserFree ( XML_Parser  parser)

Definition at line 1136 of file xmlparse.cc.

1137{
1138 TAG *tagList;
1139 OPEN_INTERNAL_ENTITY *entityList;
1140 if (parser == NULL)
1141 return;
1142 /* free tagStack and freeTagList */
1143 tagList = tagStack;
1144 for (;;) {
1145 TAG *p;
1146 if (tagList == NULL) {
1147 if (freeTagList == NULL)
1148 break;
1149 tagList = freeTagList;
1150 freeTagList = NULL;
1151 }
1152 p = tagList;
1153 tagList = tagList->parent;
1154 FREE(p->buf);
1155 destroyBindings(p->bindings, parser);
1156 FREE(p);
1157 }
1158 /* free openInternalEntities and freeInternalEntities */
1159 entityList = openInternalEntities;
1160 for (;;) {
1161 OPEN_INTERNAL_ENTITY *openEntity;
1162 if (entityList == NULL) {
1163 if (freeInternalEntities == NULL)
1164 break;
1165 entityList = freeInternalEntities;
1166 freeInternalEntities = NULL;
1167 }
1168 openEntity = entityList;
1169 entityList = entityList->next;
1170 FREE(openEntity);
1171 }
1172
1173 destroyBindings(freeBindingList, parser);
1174 destroyBindings(inheritedBindings, parser);
1175 poolDestroy(&tempPool);
1176 poolDestroy(&temp2Pool);
1177#ifdef XML_DTD
1178 /* external parameter entity parsers share the DTD structure
1179 parser->m_dtd with the root parser, so we must not destroy it
1180 */
1181 if (!isParamEntity && _dtd)
1182#else
1183 if (_dtd)
1184#endif /* XML_DTD */
1185 dtdDestroy(_dtd, (XML_Bool)!parentParser, &parser->m_mem);
1186 FREE((void *)atts);
1187#ifdef XML_ATTR_INFO
1188 FREE((void *)attInfo);
1189#endif
1191 FREE(buffer);
1192 FREE(dataBuf);
1193 FREE(nsAtts);
1197 FREE(parser);
1198}
struct open_internal_entity * next
Definition: xmlparse.cc:300
Definition: xmlparse.cc:187
struct tag * parent
Definition: xmlparse.cc:188
BINDING * bindings
Definition: xmlparse.cc:194
char * buf
Definition: xmlparse.cc:192
#define tagStack
Definition: xmlparse.cc:652
#define dataBuf
Definition: xmlparse.cc:634
#define groupConnector
Definition: xmlparse.cc:663
#define freeBindingList
Definition: xmlparse.cc:650
#define temp2Pool
Definition: xmlparse.cc:662
#define inheritedBindings
Definition: xmlparse.cc:651
#define tempPool
Definition: xmlparse.cc:661
#define nsAtts
Definition: xmlparse.cc:657
#define unknownEncodingRelease
Definition: xmlparse.cc:612
#define unknownEncodingMem
Definition: xmlparse.cc:608
#define atts
Definition: xmlparse.cc:653
#define unknownEncodingData
Definition: xmlparse.cc:609
#define freeInternalEntities
Definition: xmlparse.cc:624
#define freeTagList
Definition: xmlparse.cc:649
#define attInfo
Definition: xmlparse.cc:660

Referenced by XML_ExternalEntityParserCreate().

◆ XML_ParserReset()

XML_ParserReset ( XML_Parser  parser,
const XML_Char encoding 
)

Definition at line 931 of file xmlparse.cc.

932{
933 TAG *tStk;
934 OPEN_INTERNAL_ENTITY *openEntityList;
935 if (parentParser)
936 return XML_FALSE;
937 /* move tagStack to freeTagList */
938 tStk = tagStack;
939 while (tStk) {
940 TAG *tag = tStk;
941 tStk = tStk->parent;
943 moveToFreeBindingList(parser, tag->bindings);
944 tag->bindings = NULL;
946 }
947 /* move openInternalEntities to freeInternalEntities */
948 openEntityList = openInternalEntities;
949 while (openEntityList) {
950 OPEN_INTERNAL_ENTITY *openEntity = openEntityList;
951 openEntityList = openEntity->next;
952 openEntity->next = freeInternalEntities;
953 freeInternalEntities = openEntity;
954 }
955 moveToFreeBindingList(parser, inheritedBindings);
959 poolClear(&tempPool);
960 poolClear(&temp2Pool);
961 parserInit(parser, encodingName);
962 dtdReset(_dtd, &parser->m_mem);
963 return XML_TRUE;
964}
#define XML_FALSE
Definition: expat.h:30

◆ XML_ResumeParser()

XML_ResumeParser ( XML_Parser  parser)

Definition at line 1796 of file xmlparse.cc.

1797{
1798 enum XML_Status result = XML_STATUS_OK;
1799
1800 if (ps_parsing != XML_SUSPENDED) {
1802 return XML_STATUS_ERROR;
1803 }
1805
1807
1808 if (errorCode != XML_ERROR_NONE) {
1810 processor = errorProcessor;
1811 return XML_STATUS_ERROR;
1812 }
1813 else {
1814 switch (ps_parsing) {
1815 case XML_SUSPENDED:
1816 result = XML_STATUS_SUSPENDED;
1817 break;
1818 case XML_INITIALIZED:
1819 case XML_PARSING:
1820 if (ps_finalBuffer) {
1822 return result;
1823 }
1824 default: ;
1825 }
1826 }
1827
1830 return result;
1831}

◆ XML_SetAttlistDeclHandler()

XML_SetAttlistDeclHandler ( XML_Parser  parser,
XML_AttlistDeclHandler  attdecl 
)

Definition at line 1460 of file xmlparse.cc.

1462{
1463 attlistDeclHandler = attdecl;
1464}

◆ XML_SetBase()

XML_SetBase ( XML_Parser  parser,
const XML_Char base 
)

Definition at line 1239 of file xmlparse.cc.

1240{
1241 if (p) {
1242 p = poolCopyString(&_dtd->pool, p);
1243 if (!p)
1244 return XML_STATUS_ERROR;
1245 curBase = p;
1246 }
1247 else
1248 curBase = NULL;
1249 return XML_STATUS_OK;
1250}

◆ XML_SetCdataSectionHandler()

XML_SetCdataSectionHandler ( XML_Parser  parser,
XML_StartCdataSectionHandler  start,
XML_EndCdataSectionHandler  end 
)

Definition at line 1321 of file xmlparse.cc.

1324{
1327}

◆ XML_SetCharacterDataHandler()

XML_SetCharacterDataHandler ( XML_Parser  parser,
XML_CharacterDataHandler  handler 
)

Definition at line 1300 of file xmlparse.cc.

1302{
1303 characterDataHandler = handler;
1304}

◆ XML_SetCommentHandler()

XML_SetCommentHandler ( XML_Parser  parser,
XML_CommentHandler  handler 
)

Definition at line 1314 of file xmlparse.cc.

1316{
1317 commentHandler = handler;
1318}

◆ XML_SetDefaultHandler()

XML_SetDefaultHandler ( XML_Parser  parser,
XML_DefaultHandler  handler 
)

Definition at line 1342 of file xmlparse.cc.

1344{
1345 defaultHandler = handler;
1347}

◆ XML_SetDefaultHandlerExpand()

XML_SetDefaultHandlerExpand ( XML_Parser  parser,
XML_DefaultHandler  handler 
)

Definition at line 1350 of file xmlparse.cc.

1352{
1353 defaultHandler = handler;
1355}

◆ XML_SetDoctypeDeclHandler()

XML_SetDoctypeDeclHandler ( XML_Parser  parser,
XML_StartDoctypeDeclHandler  start,
XML_EndDoctypeDeclHandler  end 
)

Definition at line 1358 of file xmlparse.cc.

1361{
1364}
#define endDoctypeDeclHandler
Definition: xmlparse.cc:585
#define startDoctypeDeclHandler
Definition: xmlparse.cc:584

◆ XML_SetElementDeclHandler()

XML_SetElementDeclHandler ( XML_Parser  parser,
XML_ElementDeclHandler  eldecl 
)

Definition at line 1453 of file xmlparse.cc.

1455{
1456 elementDeclHandler = eldecl;
1457}

◆ XML_SetElementHandler()

XML_SetElementHandler ( XML_Parser  parser,
XML_StartElementHandler  start,
XML_EndElementHandler  end 
)

Definition at line 1279 of file xmlparse.cc.

1282{
1283 startElementHandler = start;
1284 endElementHandler = end;
1285}

◆ XML_SetEncoding()

XML_SetEncoding ( XML_Parser  parser,
const XML_Char encoding 
)

Definition at line 967 of file xmlparse.cc.

968{
969 /* Block after XML_Parse()/XML_ParseBuffer() has been called.
970 XXX There's no way for the caller to determine which of the
971 XXX possible error cases caused the XML_STATUS_ERROR return.
972 */
974 return XML_STATUS_ERROR;
975 if (encodingName == NULL)
977 else {
978 protocolEncodingName = poolCopyString(&tempPool, encodingName);
980 return XML_STATUS_ERROR;
981 }
982 return XML_STATUS_OK;
983}
#define protocolEncodingName
Definition: xmlparse.cc:613

◆ XML_SetEndCdataSectionHandler()

XML_SetEndCdataSectionHandler ( XML_Parser  parser,
XML_EndCdataSectionHandler  end 
)

Definition at line 1336 of file xmlparse.cc.

1337 {
1339}

◆ XML_SetEndDoctypeDeclHandler()

XML_SetEndDoctypeDeclHandler ( XML_Parser  parser,
XML_EndDoctypeDeclHandler  end 
)

Definition at line 1373 of file xmlparse.cc.

1374 {
1376}

◆ XML_SetEndElementHandler()

XML_SetEndElementHandler ( XML_Parser  parser,
XML_EndElementHandler  handler 
)

Definition at line 1294 of file xmlparse.cc.

1295 {
1296 endElementHandler = end;
1297}

◆ XML_SetEndNamespaceDeclHandler()

XML_SetEndNamespaceDeclHandler ( XML_Parser  parser,
XML_EndNamespaceDeclHandler  end 
)

Definition at line 1408 of file xmlparse.cc.

1409 {
1411}

◆ XML_SetEntityDeclHandler()

XML_SetEntityDeclHandler ( XML_Parser  parser,
XML_EntityDeclHandler  handler 
)

Definition at line 1467 of file xmlparse.cc.

1469{
1470 entityDeclHandler = handler;
1471}

◆ XML_SetExternalEntityRefHandler()

XML_SetExternalEntityRefHandler ( XML_Parser  parser,
XML_ExternalEntityRefHandler  handler 
)

Definition at line 1421 of file xmlparse.cc.

1423{
1424 externalEntityRefHandler = handler;
1425}

◆ XML_SetExternalEntityRefHandlerArg()

XML_SetExternalEntityRefHandlerArg ( XML_Parser  parser,
void *  arg 
)

Definition at line 1428 of file xmlparse.cc.

1429{
1430 if (arg)
1432 else
1434}
struct XML_ParserStruct * XML_Parser
Definition: expat.h:25

◆ XML_SetHashSalt()

XML_SetHashSalt ( XML_Parser  parser,
unsigned long  hash_salt 
)

Definition at line 1495 of file xmlparse.cc.

1497{
1498 /* block after XML_Parse()/XML_ParseBuffer() has been called */
1500 return 0;
1501 hash_secret_salt = hash_salt;
1502 return 1;
1503}

◆ XML_SetNamespaceDeclHandler()

XML_SetNamespaceDeclHandler ( XML_Parser  parser,
XML_StartNamespaceDeclHandler  start,
XML_EndNamespaceDeclHandler  end 
)

Definition at line 1393 of file xmlparse.cc.

1396{
1399}

◆ XML_SetNotationDeclHandler()

XML_SetNotationDeclHandler ( XML_Parser  parser,
XML_NotationDeclHandler  handler 
)

Definition at line 1386 of file xmlparse.cc.

1388{
1389 notationDeclHandler = handler;
1390}

◆ XML_SetNotStandaloneHandler()

XML_SetNotStandaloneHandler ( XML_Parser  parser,
XML_NotStandaloneHandler  handler 
)

Definition at line 1414 of file xmlparse.cc.

1416{
1417 notStandaloneHandler = handler;
1418}

◆ XML_SetParamEntityParsing()

XML_SetParamEntityParsing ( XML_Parser  parser,
enum XML_ParamEntityParsing  parsing 
)

Definition at line 1480 of file xmlparse.cc.

1482{
1483 /* block after XML_Parse()/XML_ParseBuffer() has been called */
1485 return 0;
1486#ifdef XML_DTD
1487 paramEntityParsing = peParsing;
1488 return 1;
1489#else
1490 return peParsing == XML_PARAM_ENTITY_PARSING_NEVER;
1491#endif
1492}

◆ XML_SetProcessingInstructionHandler()

XML_SetProcessingInstructionHandler ( XML_Parser  parser,
XML_ProcessingInstructionHandler  handler 
)

Definition at line 1307 of file xmlparse.cc.

1309{
1311}

◆ XML_SetReturnNSTriplet()

XML_SetReturnNSTriplet ( XML_Parser  parser,
int  do_nst 
)

Definition at line 1221 of file xmlparse.cc.

1222{
1223 /* block after XML_Parse()/XML_ParseBuffer() has been called */
1225 return;
1226 ns_triplets = do_nst ? XML_TRUE : XML_FALSE;
1227}

◆ XML_SetSkippedEntityHandler()

XML_SetSkippedEntityHandler ( XML_Parser  parser,
XML_SkippedEntityHandler  handler 
)

Definition at line 1437 of file xmlparse.cc.

1439{
1440 skippedEntityHandler = handler;
1441}

◆ XML_SetStartCdataSectionHandler()

XML_SetStartCdataSectionHandler ( XML_Parser  parser,
XML_StartCdataSectionHandler  start 
)

Definition at line 1330 of file xmlparse.cc.

1331 {
1333}

◆ XML_SetStartDoctypeDeclHandler()

XML_SetStartDoctypeDeclHandler ( XML_Parser  parser,
XML_StartDoctypeDeclHandler  start 
)

Definition at line 1367 of file xmlparse.cc.

1368 {
1370}

◆ XML_SetStartElementHandler()

XML_SetStartElementHandler ( XML_Parser  parser,
XML_StartElementHandler  handler 
)

Definition at line 1288 of file xmlparse.cc.

1289 {
1290 startElementHandler = start;
1291}

◆ XML_SetStartNamespaceDeclHandler()

XML_SetStartNamespaceDeclHandler ( XML_Parser  parser,
XML_StartNamespaceDeclHandler  start 
)

Definition at line 1402 of file xmlparse.cc.

1403 {
1405}

◆ XML_SetUnknownEncodingHandler()

XML_SetUnknownEncodingHandler ( XML_Parser  parser,
XML_UnknownEncodingHandler  handler,
void *  encodingHandlerData 
)

Definition at line 1444 of file xmlparse.cc.

1447{
1448 unknownEncodingHandler = handler;
1450}
#define unknownEncodingHandlerData
Definition: xmlparse.cc:610

◆ XML_SetUnparsedEntityDeclHandler()

XML_SetUnparsedEntityDeclHandler ( XML_Parser  parser,
XML_UnparsedEntityDeclHandler  handler 
)

Definition at line 1379 of file xmlparse.cc.

1381{
1382 unparsedEntityDeclHandler = handler;
1383}

◆ XML_SetUserData()

XML_SetUserData ( XML_Parser  parser,
void *  userData 
)

Definition at line 1230 of file xmlparse.cc.

1231{
1232 if (handlerArg == userData)
1233 handlerArg = userData = p;
1234 else
1235 userData = p;
1236}

◆ XML_SetXmlDeclHandler()

XML_SetXmlDeclHandler ( XML_Parser  parser,
XML_XmlDeclHandler  xmldecl 
)

Definition at line 1474 of file xmlparse.cc.

1475 {
1476 xmlDeclHandler = handler;
1477}

◆ XML_StopParser()

XML_StopParser ( XML_Parser  parser,
XML_Bool  resumable 
)

Definition at line 1766 of file xmlparse.cc.

1767{
1768 switch (ps_parsing) {
1769 case XML_SUSPENDED:
1770 if (resumable) {
1772 return XML_STATUS_ERROR;
1773 }
1775 break;
1776 case XML_FINISHED:
1778 return XML_STATUS_ERROR;
1779 default:
1780 if (resumable) {
1781#ifdef XML_DTD
1782 if (isParamEntity) {
1784 return XML_STATUS_ERROR;
1785 }
1786#endif
1788 }
1789 else
1791 }
1792 return XML_STATUS_OK;
1793}

◆ XML_UseForeignDTD()

XML_UseForeignDTD ( XML_Parser  parser,
XML_Bool  useDTD 
)

Definition at line 1207 of file xmlparse.cc.

1208{
1209#ifdef XML_DTD
1210 /* block after XML_Parse()/XML_ParseBuffer() has been called */
1213 useForeignDTD = useDTD;
1214 return XML_ERROR_NONE;
1215#else
1217#endif
1218}

◆ XML_UseParserAsHandlerArg()

XML_UseParserAsHandlerArg ( XML_Parser  parser)

Definition at line 1201 of file xmlparse.cc.

1202{
1203 handlerArg = parser;
1204}

◆ XMLPARSEAPI() [1/2]

XMLPARSEAPI ( XML_Index  )

◆ XMLPARSEAPI() [2/2]

XMLPARSEAPI ( XML_Size  )