Back to index

python3.2  3.2.2
Classes | Defines | Typedefs | Enumerations | Functions
expat.h File Reference
#include <stdlib.h>
#include "expat_external.h"
This graph shows which files directly or indirectly include this file:

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

Defines

#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   0
#define XML_MICRO_VERSION   0

Typedefs

typedef struct XML_ParserStructXML_Parser
typedef unsigned char XML_Bool
typedef struct XML_cp
typedef const XML_Charname
typedef const XML_Char
XML_Content * 
model
typedef const XML_Charelname
typedef const XML_Char const
XML_Char
attname
typedef const XML_Char const
XML_Char const XML_Char
att_type
typedef const XML_Char const
XML_Char const XML_Char const
XML_Char
dflt
typedef const XML_Char const
XML_Char const XML_Char const
XML_Char int 
isrequired
typedef const XML_Charversion
typedef const XML_Char const
XML_Char
encoding
typedef const XML_Char const
XML_Char int 
standalone
typedef const XML_Char const
XML_Char ** 
atts
typedef const XML_Chars
typedef const XML_Char int len
typedef const XML_Chartarget
typedef const XML_Char const
XML_Char
data
typedef const XML_ChardoctypeName
typedef const XML_Char const
XML_Char
sysid
typedef const XML_Char const
XML_Char const XML_Char
pubid
typedef const XML_Char const
XML_Char const XML_Char int 
has_internal_subset
typedef void(XMLCALLXML_EndDoctypeDeclHandler )(void *userData)
typedef const XML_CharentityName
typedef const XML_Char int is_parameter_entity
typedef const XML_Char int
const XML_Char
value
typedef const XML_Char int
const XML_Char int 
value_length
typedef const XML_Char int
const XML_Char int const
XML_Char
base
typedef const XML_Char int
const XML_Char int const
XML_Char const XML_Char
systemId
typedef const XML_Char int
const XML_Char int const
XML_Char const XML_Char const
XML_Char
publicId
typedef const XML_Char int
const XML_Char int const
XML_Char const XML_Char const
XML_Char const XML_Char
notationName
typedef const XML_Charprefix
typedef const XML_Char const
XML_Char
uri
typedef const XML_Charcontext
typedef const XML_Char
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
}

Functions

typedef void (XMLCALL *XML_ElementDeclHandler)(void *userData
 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)
typedef int (XMLCALL *XML_NotStandaloneHandler)(void *userData)
 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_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)

Class Documentation

struct XML_cp

Definition at line 137 of file expat.h.

struct XML_ParsingStatus

Definition at line 819 of file expat.h.

struct XML_Expat_Version

Definition at line 964 of file expat.h.

Class Members
int major
int micro
int minor
struct XML_Feature

Definition at line 990 of file expat.h.


Define Documentation

#define XML_FALSE   ((XML_Bool) 0)

Definition at line 30 of file expat.h.

Definition at line 936 of file expat.h.

Definition at line 935 of file expat.h.

Definition at line 934 of file expat.h.

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

Definition at line 674 of file expat.h.

#define XML_MAJOR_VERSION   2

Definition at line 1005 of file expat.h.

#define XML_MICRO_VERSION   0

Definition at line 1007 of file expat.h.

#define XML_MINOR_VERSION   0

Definition at line 1006 of file expat.h.

Definition at line 47 of file expat.h.

Definition at line 49 of file expat.h.

#define XML_TRUE   ((XML_Bool) 1)

Definition at line 29 of file expat.h.


Typedef Documentation

Definition at line 168 of file expat.h.

Definition at line 168 of file expat.h.

Definition at line 253 of file expat.h.

Definition at line 331 of file expat.h.

Definition at line 434 of file expat.h.

typedef const XML_Char * data

Definition at line 268 of file expat.h.

Definition at line 168 of file expat.h.

Definition at line 300 of file expat.h.

typedef const XML_Char* elname

Definition at line 168 of file expat.h.

Definition at line 187 of file expat.h.

Definition at line 331 of file expat.h.

Definition at line 300 of file expat.h.

Definition at line 530 of file expat.h.

Definition at line 331 of file expat.h.

Definition at line 168 of file expat.h.

typedef const XML_Char int len

Definition at line 262 of file expat.h.

typedef const XML_Char XML_Content* model

Definition at line 151 of file expat.h.

typedef const XML_Char * name

Definition at line 151 of file expat.h.

Definition at line 331 of file expat.h.

typedef const XML_Char * prefix

Definition at line 380 of file expat.h.

Definition at line 300 of file expat.h.

Definition at line 331 of file expat.h.

typedef const XML_Char * s

Definition at line 262 of file expat.h.

Definition at line 187 of file expat.h.

Definition at line 300 of file expat.h.

Definition at line 331 of file expat.h.

typedef const XML_Char* target

Definition at line 268 of file expat.h.

Definition at line 380 of file expat.h.

Definition at line 331 of file expat.h.

Definition at line 331 of file expat.h.

Definition at line 187 of file expat.h.

typedef unsigned char XML_Bool

Definition at line 28 of file expat.h.

typedef struct XML_cp

Definition at line 135 of file expat.h.

Definition at line 309 of file expat.h.

typedef struct XML_ParserStruct* XML_Parser

Definition at line 25 of file expat.h.


Enumeration Type Documentation

Enumerator:
XML_CQUANT_NONE 
XML_CQUANT_OPT 
XML_CQUANT_REP 
XML_CQUANT_PLUS 

Definition at line 110 of file expat.h.

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.

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.

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 

Definition at line 977 of file expat.h.

Enumerator:
XML_PARAM_ENTITY_PARSING_NEVER 
XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE 
XML_PARAM_ENTITY_PARSING_ALWAYS 

Definition at line 853 of file expat.h.

Enumerator:
XML_INITIALIZED 
XML_PARSING 
XML_FINISHED 
XML_SUSPENDED 

Definition at line 812 of file expat.h.

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.

                {
  XML_STATUS_ERROR = 0,
#define XML_STATUS_ERROR XML_STATUS_ERROR
  XML_STATUS_OK = 1,
#define XML_STATUS_OK XML_STATUS_OK
  XML_STATUS_SUSPENDED = 2
#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
};

Function Documentation

typedef int ( XMLCALL XML_NotStandaloneHandler)
typedef void ( XMLCALL XML_ElementDeclHandler)

Definition at line 1828 of file xmlparse.c.

{
  if (defaultHandler) {
    if (openInternalEntities)
      reportDefault(parser,
                    internalEncoding,
                    openInternalEntities->internalEventPtr,
                    openInternalEntities->internalEventEndPtr);
    else
      reportDefault(parser, encoding, eventPtr, eventEndPtr);
  }
}

Here is the call graph for this function:

XML_ErrorString ( enum XML_Error  code)

Definition at line 1842 of file xmlparse.c.

{
  static const XML_LChar* const message[] = {
    0,
    XML_L("out of memory"),
    XML_L("syntax error"),
    XML_L("no element found"),
    XML_L("not well-formed (invalid token)"),
    XML_L("unclosed token"),
    XML_L("partial character"),
    XML_L("mismatched tag"),
    XML_L("duplicate attribute"),
    XML_L("junk after document element"),
    XML_L("illegal parameter entity reference"),
    XML_L("undefined entity"),
    XML_L("recursive entity reference"),
    XML_L("asynchronous entity"),
    XML_L("reference to invalid character number"),
    XML_L("reference to binary entity"),
    XML_L("reference to external entity in attribute"),
    XML_L("XML or text declaration not at start of entity"),
    XML_L("unknown encoding"),
    XML_L("encoding specified in XML declaration is incorrect"),
    XML_L("unclosed CDATA section"),
    XML_L("error in processing external entity reference"),
    XML_L("document is not standalone"),
    XML_L("unexpected parser state - please send a bug report"),
    XML_L("entity declared in parameter entity"),
    XML_L("requested feature requires XML_DTD support in Expat"),
    XML_L("cannot change setting once parsing has begun"),
    XML_L("unbound prefix"),
    XML_L("must not undeclare prefix"),
    XML_L("incomplete markup in parameter entity"),
    XML_L("XML declaration not well-formed"),
    XML_L("text declaration not well-formed"),
    XML_L("illegal character(s) in public id"),
    XML_L("parser suspended"),
    XML_L("parser not suspended"),
    XML_L("parsing aborted"),
    XML_L("parsing finished"),
    XML_L("cannot suspend in external parameter entity"),
    XML_L("reserved prefix (xml) must not be undeclared or bound to another namespace name"),
    XML_L("reserved prefix (xmlns) must not be declared or undeclared"),
    XML_L("prefix must not be bound to one of the reserved namespace names")
  };
  if (code > 0 && code < sizeof(message)/sizeof(message[0]))
    return message[code];
  return NULL;
}

Definition at line 1893 of file xmlparse.c.

                       {

  /* V1 is used to string-ize the version number. However, it would
     string-ize the actual version macro *names* unless we get them
     substituted before being passed to V1. CPP is defined to expand
     a macro, then rescan for more expansions. Thus, we use V2 to expand
     the version macros, then CPP will expand the resulting V1() macro
     with the correct numerals. */
  /* ### I'm assuming cpp is portable in this respect... */

#define V1(a,b,c) XML_L(#a)XML_L(".")XML_L(#b)XML_L(".")XML_L(#c)
#define V2(a,b,c) XML_L("expat_")V1(a,b,c)

  return V2(XML_MAJOR_VERSION, XML_MINOR_VERSION, XML_MICRO_VERSION);

#undef V1
#undef V2
}

Definition at line 1913 of file xmlparse.c.

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

Definition at line 933 of file xmlparse.c.

{
  XML_Parser parser = oldParser;
  DTD *newDtd = NULL;
  DTD *oldDtd = _dtd;
  XML_StartElementHandler oldStartElementHandler = startElementHandler;
  XML_EndElementHandler oldEndElementHandler = endElementHandler;
  XML_CharacterDataHandler oldCharacterDataHandler = characterDataHandler;
  XML_ProcessingInstructionHandler oldProcessingInstructionHandler
      = processingInstructionHandler;
  XML_CommentHandler oldCommentHandler = commentHandler;
  XML_StartCdataSectionHandler oldStartCdataSectionHandler
      = startCdataSectionHandler;
  XML_EndCdataSectionHandler oldEndCdataSectionHandler
      = endCdataSectionHandler;
  XML_DefaultHandler oldDefaultHandler = defaultHandler;
  XML_UnparsedEntityDeclHandler oldUnparsedEntityDeclHandler
      = unparsedEntityDeclHandler;
  XML_NotationDeclHandler oldNotationDeclHandler = notationDeclHandler;
  XML_StartNamespaceDeclHandler oldStartNamespaceDeclHandler
      = startNamespaceDeclHandler;
  XML_EndNamespaceDeclHandler oldEndNamespaceDeclHandler
      = endNamespaceDeclHandler;
  XML_NotStandaloneHandler oldNotStandaloneHandler = notStandaloneHandler;
  XML_ExternalEntityRefHandler oldExternalEntityRefHandler
      = externalEntityRefHandler;
  XML_SkippedEntityHandler oldSkippedEntityHandler = skippedEntityHandler;
  XML_UnknownEncodingHandler oldUnknownEncodingHandler
      = unknownEncodingHandler;
  XML_ElementDeclHandler oldElementDeclHandler = elementDeclHandler;
  XML_AttlistDeclHandler oldAttlistDeclHandler = attlistDeclHandler;
  XML_EntityDeclHandler oldEntityDeclHandler = entityDeclHandler;
  XML_XmlDeclHandler oldXmlDeclHandler = xmlDeclHandler;
  ELEMENT_TYPE * oldDeclElementType = declElementType;

  void *oldUserData = userData;
  void *oldHandlerArg = handlerArg;
  XML_Bool oldDefaultExpandInternalEntities = defaultExpandInternalEntities;
  XML_Parser oldExternalEntityRefHandlerArg = externalEntityRefHandlerArg;
#ifdef XML_DTD
  enum XML_ParamEntityParsing oldParamEntityParsing = paramEntityParsing;
  int oldInEntityValue = prologState.inEntityValue;
#endif
  XML_Bool oldns_triplets = ns_triplets;

#ifdef XML_DTD
  if (!context)
    newDtd = oldDtd;
#endif /* XML_DTD */

  /* Note that the magical uses of the pre-processor to make field
     access look more like C++ require that `parser' be overwritten
     here.  This makes this function more painful to follow than it
     would be otherwise.
  */
  if (ns) {
    XML_Char tmp[2];
    *tmp = namespaceSeparator;
    parser = parserCreate(encodingName, &parser->m_mem, tmp, newDtd);
  }
  else {
    parser = parserCreate(encodingName, &parser->m_mem, NULL, newDtd);
  }

  if (!parser)
    return NULL;

  startElementHandler = oldStartElementHandler;
  endElementHandler = oldEndElementHandler;
  characterDataHandler = oldCharacterDataHandler;
  processingInstructionHandler = oldProcessingInstructionHandler;
  commentHandler = oldCommentHandler;
  startCdataSectionHandler = oldStartCdataSectionHandler;
  endCdataSectionHandler = oldEndCdataSectionHandler;
  defaultHandler = oldDefaultHandler;
  unparsedEntityDeclHandler = oldUnparsedEntityDeclHandler;
  notationDeclHandler = oldNotationDeclHandler;
  startNamespaceDeclHandler = oldStartNamespaceDeclHandler;
  endNamespaceDeclHandler = oldEndNamespaceDeclHandler;
  notStandaloneHandler = oldNotStandaloneHandler;
  externalEntityRefHandler = oldExternalEntityRefHandler;
  skippedEntityHandler = oldSkippedEntityHandler;
  unknownEncodingHandler = oldUnknownEncodingHandler;
  elementDeclHandler = oldElementDeclHandler;
  attlistDeclHandler = oldAttlistDeclHandler;
  entityDeclHandler = oldEntityDeclHandler;
  xmlDeclHandler = oldXmlDeclHandler;
  declElementType = oldDeclElementType;
  userData = oldUserData;
  if (oldUserData == oldHandlerArg)
    handlerArg = userData;
  else
    handlerArg = parser;
  if (oldExternalEntityRefHandlerArg != oldParser)
    externalEntityRefHandlerArg = oldExternalEntityRefHandlerArg;
  defaultExpandInternalEntities = oldDefaultExpandInternalEntities;
  ns_triplets = oldns_triplets;
  parentParser = oldParser;
#ifdef XML_DTD
  paramEntityParsing = oldParamEntityParsing;
  prologState.inEntityValue = oldInEntityValue;
  if (context) {
#endif /* XML_DTD */
    if (!dtdCopy(_dtd, oldDtd, &parser->m_mem)
      || !setContext(parser, context)) {
      XML_ParserFree(parser);
      return NULL;
    }
    processor = externalEntityInitProcessor;
#ifdef XML_DTD
  }
  else {
    /* The DTD instance referenced by _dtd is shared between the document's
       root parser and external PE parsers, therefore one does not need to
       call setContext. In addition, one also *must* not call setContext,
       because this would overwrite existing prefix->binding pointers in
       _dtd with ones that get destroyed with the external PE parser.
       This would leave those prefixes with dangling pointers.
    */
    isParamEntity = XML_TRUE;
    XmlPrologStateInitExternalEntity(&prologState);
    processor = externalParEntInitProcessor;
  }
#endif /* XML_DTD */
  return parser;
}

Here is the call graph for this function:

XML_FreeContentModel ( XML_Parser  parser,
XML_Content *  model 
)

Definition at line 1804 of file xmlparse.c.

{
  FREE(model);
}
XML_GetBase ( XML_Parser  parser)

Definition at line 1190 of file xmlparse.c.

{
  return curBase;
}
XML_GetBuffer ( XML_Parser  parser,
int  len 
)

Definition at line 1595 of file xmlparse.c.

{
  switch (ps_parsing) {
  case XML_SUSPENDED:
    errorCode = XML_ERROR_SUSPENDED;
    return NULL;
  case XML_FINISHED:
    errorCode = XML_ERROR_FINISHED;
    return NULL;
  default: ;
  }

  if (len > bufferLim - bufferEnd) {
    /* FIXME avoid integer overflow */
    int neededSize = len + (int)(bufferEnd - bufferPtr);
#ifdef XML_CONTEXT_BYTES
    int keep = (int)(bufferPtr - buffer);

    if (keep > XML_CONTEXT_BYTES)
      keep = XML_CONTEXT_BYTES;
    neededSize += keep;
#endif  /* defined XML_CONTEXT_BYTES */
    if (neededSize  <= bufferLim - buffer) {
#ifdef XML_CONTEXT_BYTES
      if (keep < bufferPtr - buffer) {
        int offset = (int)(bufferPtr - buffer) - keep;
        memmove(buffer, &buffer[offset], bufferEnd - bufferPtr + keep);
        bufferEnd -= offset;
        bufferPtr -= offset;
      }
#else
      memmove(buffer, bufferPtr, bufferEnd - bufferPtr);
      bufferEnd = buffer + (bufferEnd - bufferPtr);
      bufferPtr = buffer;
#endif  /* not defined XML_CONTEXT_BYTES */
    }
    else {
      char *newBuf;
      int bufferSize = (int)(bufferLim - bufferPtr);
      if (bufferSize == 0)
        bufferSize = INIT_BUFFER_SIZE;
      do {
        bufferSize *= 2;
      } while (bufferSize < neededSize);
      newBuf = (char *)MALLOC(bufferSize);
      if (newBuf == 0) {
        errorCode = XML_ERROR_NO_MEMORY;
        return NULL;
      }
      bufferLim = newBuf + bufferSize;
#ifdef XML_CONTEXT_BYTES
      if (bufferPtr) {
        int keep = (int)(bufferPtr - buffer);
        if (keep > XML_CONTEXT_BYTES)
          keep = XML_CONTEXT_BYTES;
        memcpy(newBuf, &bufferPtr[-keep], bufferEnd - bufferPtr + keep);
        FREE(buffer);
        buffer = newBuf;
        bufferEnd = buffer + (bufferEnd - bufferPtr) + keep;
        bufferPtr = buffer + keep;
      }
      else {
        bufferEnd = newBuf + (bufferEnd - bufferPtr);
        bufferPtr = buffer = newBuf;
      }
#else
      if (bufferPtr) {
        memcpy(newBuf, bufferPtr, bufferEnd - bufferPtr);
        FREE(buffer);
      }
      bufferEnd = newBuf + (bufferEnd - bufferPtr);
      bufferPtr = buffer = newBuf;
#endif  /* not defined XML_CONTEXT_BYTES */
    }
  }
  return bufferEnd;
}

Definition at line 1763 of file xmlparse.c.

{
  if (eventEndPtr && eventPtr)
    return (int)(eventEndPtr - eventPtr);
  return 0;
}
XML_GetErrorCode ( XML_Parser  parser) [abstract]

Definition at line 1749 of file xmlparse.c.

{
  return errorCode;
}

Definition at line 1925 of file xmlparse.c.

{
  static const XML_Feature features[] = {
    {XML_FEATURE_SIZEOF_XML_CHAR,  XML_L("sizeof(XML_Char)"),
     sizeof(XML_Char)},
    {XML_FEATURE_SIZEOF_XML_LCHAR, XML_L("sizeof(XML_LChar)"),
     sizeof(XML_LChar)},
#ifdef XML_UNICODE
    {XML_FEATURE_UNICODE,          XML_L("XML_UNICODE"), 0},
#endif
#ifdef XML_UNICODE_WCHAR_T
    {XML_FEATURE_UNICODE_WCHAR_T,  XML_L("XML_UNICODE_WCHAR_T"), 0},
#endif
#ifdef XML_DTD
    {XML_FEATURE_DTD,              XML_L("XML_DTD"), 0},
#endif
#ifdef XML_CONTEXT_BYTES
    {XML_FEATURE_CONTEXT_BYTES,    XML_L("XML_CONTEXT_BYTES"),
     XML_CONTEXT_BYTES},
#endif
#ifdef XML_MIN_SIZE
    {XML_FEATURE_MIN_SIZE,         XML_L("XML_MIN_SIZE"), 0},
#endif
#ifdef XML_NS
    {XML_FEATURE_NS,               XML_L("XML_NS"), 0},
#endif
    {XML_FEATURE_END,              NULL, 0}
  };

  return features;
}

Definition at line 1202 of file xmlparse.c.

{
  return idAttIndex;
}
XML_GetInputContext ( XML_Parser  parser,
int offset,
int size 
)

Definition at line 1771 of file xmlparse.c.

{
#ifdef XML_CONTEXT_BYTES
  if (eventPtr && buffer) {
    *offset = (int)(eventPtr - buffer);
    *size   = (int)(bufferEnd - buffer);
    return buffer;
  }
#endif /* defined XML_CONTEXT_BYTES */
  return (char *) 0;
}

Definition at line 1742 of file xmlparse.c.

{
  assert(status != NULL);
  *status = parser->m_parsingStatus;
}

Definition at line 1196 of file xmlparse.c.

{
  return nSpecifiedAtts;
}
XML_MemFree ( XML_Parser  parser,
void ptr 
)

Definition at line 1822 of file xmlparse.c.

{
  FREE(ptr);
}
XML_MemMalloc ( XML_Parser  parser,
size_t  size 
)

Definition at line 1810 of file xmlparse.c.

{
  return MALLOC(size);
}
XML_MemRealloc ( XML_Parser  parser,
void ptr,
size_t  size 
)

Definition at line 1816 of file xmlparse.c.

{
  return REALLOC(ptr, size);
}
XML_Parse ( XML_Parser  parser,
const char *  s,
int  len,
int  isFinal 
) [abstract]

Definition at line 1424 of file xmlparse.c.

{
  switch (ps_parsing) {
  case XML_SUSPENDED:
    errorCode = XML_ERROR_SUSPENDED;
    return XML_STATUS_ERROR;
  case XML_FINISHED:
    errorCode = XML_ERROR_FINISHED;
    return XML_STATUS_ERROR;
  default:
    ps_parsing = XML_PARSING;
  }

  if (len == 0) {
    ps_finalBuffer = (XML_Bool)isFinal;
    if (!isFinal)
      return XML_STATUS_OK;
    positionPtr = bufferPtr;
    parseEndPtr = bufferEnd;

    /* If data are left over from last buffer, and we now know that these
       data are the final chunk of input, then we have to check them again
       to detect errors based on that fact.
    */
    errorCode = processor(parser, bufferPtr, parseEndPtr, &bufferPtr);

    if (errorCode == XML_ERROR_NONE) {
      switch (ps_parsing) {
      case XML_SUSPENDED:
        XmlUpdatePosition(encoding, positionPtr, bufferPtr, &position);
        positionPtr = bufferPtr;
        return XML_STATUS_SUSPENDED;
      case XML_INITIALIZED: 
      case XML_PARSING:
        ps_parsing = XML_FINISHED;
        /* fall through */
      default:
        return XML_STATUS_OK;
      }
    }
    eventEndPtr = eventPtr;
    processor = errorProcessor;
    return XML_STATUS_ERROR;
  }
#ifndef XML_CONTEXT_BYTES
  else if (bufferPtr == bufferEnd) {
    const char *end;
    int nLeftOver;
    enum XML_Error result;
    parseEndByteIndex += len;
    positionPtr = s;
    ps_finalBuffer = (XML_Bool)isFinal;

    errorCode = processor(parser, s, parseEndPtr = s + len, &end);

    if (errorCode != XML_ERROR_NONE) {
      eventEndPtr = eventPtr;
      processor = errorProcessor;
      return XML_STATUS_ERROR;
    }
    else {
      switch (ps_parsing) {
      case XML_SUSPENDED:
        result = XML_STATUS_SUSPENDED;
        break;
      case XML_INITIALIZED:
      case XML_PARSING:
        result = XML_STATUS_OK;
        if (isFinal) {
          ps_parsing = XML_FINISHED;
          return result;
        }
      }
    }

    XmlUpdatePosition(encoding, positionPtr, end, &position);
    nLeftOver = s + len - end;
    if (nLeftOver) {
      if (buffer == NULL || nLeftOver > bufferLim - buffer) {
        /* FIXME avoid integer overflow */
        char *temp;
        temp = (buffer == NULL
                ? (char *)MALLOC(len * 2)
                : (char *)REALLOC(buffer, len * 2));
        if (temp == NULL) {
          errorCode = XML_ERROR_NO_MEMORY;
          return XML_STATUS_ERROR;
        }
        buffer = temp;
        if (!buffer) {
          errorCode = XML_ERROR_NO_MEMORY;
          eventPtr = eventEndPtr = NULL;
          processor = errorProcessor;
          return XML_STATUS_ERROR;
        }
        bufferLim = buffer + len * 2;
      }
      memcpy(buffer, end, nLeftOver);
    }
    bufferPtr = buffer;
    bufferEnd = buffer + nLeftOver;
    positionPtr = bufferPtr;
    parseEndPtr = bufferEnd;
    eventPtr = bufferPtr;
    eventEndPtr = bufferPtr;
    return result;
  }
#endif  /* not defined XML_CONTEXT_BYTES */
  else {
    void *buff = XML_GetBuffer(parser, len);
    if (buff == NULL)
      return XML_STATUS_ERROR;
    else {
      memcpy(buff, s, len);
      return XML_ParseBuffer(parser, len, isFinal);
    }
  }
}
XML_ParseBuffer ( XML_Parser  parser,
int  len,
int  isFinal 
) [abstract]
XML_ParserCreate ( const XML_Char encoding)

Definition at line 654 of file xmlparse.c.

{
  return XML_ParserCreate_MM(encodingName, NULL, NULL);
}
XML_ParserCreate_MM ( const XML_Char encoding,
const XML_Memory_Handling_Suite memsuite,
const XML_Char namespaceSeparator 
)

Definition at line 675 of file xmlparse.c.

{
  XML_Parser parser = parserCreate(encodingName, memsuite, nameSep, NULL);
  if (parser != NULL && ns) {
    /* implicit context only set for root parser, since child
       parsers (i.e. external entity parsers) will inherit it
    */
    if (!setContext(parser, implicitContext)) {
      XML_ParserFree(parser);
      return NULL;
    }
  }
  return parser;
}

Here is the call graph for this function:

XML_ParserCreateNS ( const XML_Char encoding,
XML_Char  namespaceSeparator 
)

Definition at line 660 of file xmlparse.c.

{
  XML_Char tmp[2];
  *tmp = nsSep;
  return XML_ParserCreate_MM(encodingName, NULL, tmp);
}

Definition at line 1076 of file xmlparse.c.

{
  TAG *tagList;
  OPEN_INTERNAL_ENTITY *entityList;
  if (parser == NULL)
    return;
  /* free tagStack and freeTagList */
  tagList = tagStack;
  for (;;) {
    TAG *p;
    if (tagList == NULL) {
      if (freeTagList == NULL)
        break;
      tagList = freeTagList;
      freeTagList = NULL;
    }
    p = tagList;
    tagList = tagList->parent;
    FREE(p->buf);
    destroyBindings(p->bindings, parser);
    FREE(p);
  }
  /* free openInternalEntities and freeInternalEntities */
  entityList = openInternalEntities;
  for (;;) {
    OPEN_INTERNAL_ENTITY *openEntity;
    if (entityList == NULL) {
      if (freeInternalEntities == NULL)
        break;
      entityList = freeInternalEntities;
      freeInternalEntities = NULL;
    }
    openEntity = entityList;
    entityList = entityList->next;
    FREE(openEntity);
  }

  destroyBindings(freeBindingList, parser);
  destroyBindings(inheritedBindings, parser);
  poolDestroy(&tempPool);
  poolDestroy(&temp2Pool);
#ifdef XML_DTD
  /* external parameter entity parsers share the DTD structure
     parser->m_dtd with the root parser, so we must not destroy it
  */
  if (!isParamEntity && _dtd)
#else
  if (_dtd)
#endif /* XML_DTD */
    dtdDestroy(_dtd, (XML_Bool)!parentParser, &parser->m_mem);
  FREE((void *)atts);
  FREE(groupConnector);
  FREE(buffer);
  FREE(dataBuf);
  FREE(nsAtts);
  FREE(unknownEncodingMem);
  if (unknownEncodingRelease)
    unknownEncodingRelease(unknownEncodingData);
  FREE(parser);
}

Here is the call graph for this function:

XML_ParserReset ( XML_Parser  parser,
const XML_Char encoding 
)

Definition at line 878 of file xmlparse.c.

{
  TAG *tStk;
  OPEN_INTERNAL_ENTITY *openEntityList;
  if (parentParser)
    return XML_FALSE;
  /* move tagStack to freeTagList */
  tStk = tagStack;
  while (tStk) {
    TAG *tag = tStk;
    tStk = tStk->parent;
    tag->parent = freeTagList;
    moveToFreeBindingList(parser, tag->bindings);
    tag->bindings = NULL;
    freeTagList = tag;
  }
  /* move openInternalEntities to freeInternalEntities */
  openEntityList = openInternalEntities;
  while (openEntityList) {
    OPEN_INTERNAL_ENTITY *openEntity = openEntityList;
    openEntityList = openEntity->next;
    openEntity->next = freeInternalEntities;
    freeInternalEntities = openEntity;
  }
  moveToFreeBindingList(parser, inheritedBindings);
  FREE(unknownEncodingMem);
  if (unknownEncodingRelease)
    unknownEncodingRelease(unknownEncodingData);
  poolClear(&tempPool);
  poolClear(&temp2Pool);
  parserInit(parser, encodingName);
  dtdReset(_dtd, &parser->m_mem);
  return setContext(parser, implicitContext);
}

Here is the call graph for this function:

XML_ResumeParser ( XML_Parser  parser) [abstract]
XML_SetAttlistDeclHandler ( XML_Parser  parser,
XML_AttlistDeclHandler  attdecl 
)

Definition at line 1389 of file xmlparse.c.

{
  attlistDeclHandler = attdecl;
}
XML_SetBase ( XML_Parser  parser,
const XML_Char base 
) [abstract]

Definition at line 1176 of file xmlparse.c.

{
  if (p) {
    p = poolCopyString(&_dtd->pool, p);
    if (!p)
      return XML_STATUS_ERROR;
    curBase = p;
  }
  else
    curBase = NULL;
  return XML_STATUS_OK;
}

Here is the call graph for this function:

XML_SetCdataSectionHandler ( XML_Parser  parser,
XML_StartCdataSectionHandler  start,
XML_EndCdataSectionHandler  end 
)
XML_SetCharacterDataHandler ( XML_Parser  parser,
XML_CharacterDataHandler  handler 
)

Definition at line 1229 of file xmlparse.c.

XML_SetCommentHandler ( XML_Parser  parser,
XML_CommentHandler  handler 
)

Definition at line 1243 of file xmlparse.c.

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 
)

Definition at line 1287 of file xmlparse.c.

XML_SetElementDeclHandler ( XML_Parser  parser,
XML_ElementDeclHandler  eldecl 
)

Definition at line 1382 of file xmlparse.c.

{
  elementDeclHandler = eldecl;
}
XML_SetElementHandler ( XML_Parser  parser,
XML_StartElementHandler  start,
XML_EndElementHandler  end 
)

Definition at line 1208 of file xmlparse.c.

XML_SetEncoding ( XML_Parser  parser,
const XML_Char encoding 
) [abstract]

Definition at line 914 of file xmlparse.c.

{
  /* Block after XML_Parse()/XML_ParseBuffer() has been called.
     XXX There's no way for the caller to determine which of the
     XXX possible error cases caused the XML_STATUS_ERROR return.
  */
  if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED)
    return XML_STATUS_ERROR;
  if (encodingName == NULL)
    protocolEncodingName = NULL;
  else {
    protocolEncodingName = poolCopyString(&tempPool, encodingName);
    if (!protocolEncodingName)
      return XML_STATUS_ERROR;
  }
  return XML_STATUS_OK;
}

Here is the call graph for this function:

XML_SetEndCdataSectionHandler ( XML_Parser  parser,
XML_EndCdataSectionHandler  end 
)

Definition at line 1265 of file xmlparse.c.

Definition at line 1302 of file xmlparse.c.

XML_SetEndElementHandler ( XML_Parser  parser,
XML_EndElementHandler  handler 
)

Definition at line 1223 of file xmlparse.c.

XML_SetEndNamespaceDeclHandler ( XML_Parser  parser,
XML_EndNamespaceDeclHandler  end 
)

Definition at line 1337 of file xmlparse.c.

XML_SetEntityDeclHandler ( XML_Parser  parser,
XML_EntityDeclHandler  handler 
)

Definition at line 1396 of file xmlparse.c.

XML_SetExternalEntityRefHandler ( XML_Parser  parser,
XML_ExternalEntityRefHandler  handler 
)

Definition at line 1350 of file xmlparse.c.

XML_SetNamespaceDeclHandler ( XML_Parser  parser,
XML_StartNamespaceDeclHandler  start,
XML_EndNamespaceDeclHandler  end 
)
XML_SetNotationDeclHandler ( XML_Parser  parser,
XML_NotationDeclHandler  handler 
)

Definition at line 1315 of file xmlparse.c.

XML_SetNotStandaloneHandler ( XML_Parser  parser,
XML_NotStandaloneHandler  handler 
)

Definition at line 1343 of file xmlparse.c.

Definition at line 1409 of file xmlparse.c.

{
  /* block after XML_Parse()/XML_ParseBuffer() has been called */
  if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED)
    return 0;
#ifdef XML_DTD
  paramEntityParsing = peParsing;
  return 1;
#else
  return peParsing == XML_PARAM_ENTITY_PARSING_NEVER;
#endif
}
XML_SetProcessingInstructionHandler ( XML_Parser  parser,
XML_ProcessingInstructionHandler  handler 
)

Definition at line 1236 of file xmlparse.c.

XML_SetReturnNSTriplet ( XML_Parser  parser,
int  do_nst 
)

Definition at line 1158 of file xmlparse.c.

{
  /* block after XML_Parse()/XML_ParseBuffer() has been called */
  if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED)
    return;
  ns_triplets = do_nst ? XML_TRUE : XML_FALSE;
}
XML_SetSkippedEntityHandler ( XML_Parser  parser,
XML_SkippedEntityHandler  handler 
)

Definition at line 1366 of file xmlparse.c.

XML_SetStartCdataSectionHandler ( XML_Parser  parser,
XML_StartCdataSectionHandler  start 
)

Definition at line 1259 of file xmlparse.c.

XML_SetStartDoctypeDeclHandler ( XML_Parser  parser,
XML_StartDoctypeDeclHandler  start 
)

Definition at line 1296 of file xmlparse.c.

XML_SetStartElementHandler ( XML_Parser  parser,
XML_StartElementHandler  handler 
)

Definition at line 1217 of file xmlparse.c.

XML_SetStartNamespaceDeclHandler ( XML_Parser  parser,
XML_StartNamespaceDeclHandler  start 
)

Definition at line 1331 of file xmlparse.c.

XML_SetUnknownEncodingHandler ( XML_Parser  parser,
XML_UnknownEncodingHandler  handler,
void encodingHandlerData 
)
XML_SetUnparsedEntityDeclHandler ( XML_Parser  parser,
XML_UnparsedEntityDeclHandler  handler 
)

Definition at line 1308 of file xmlparse.c.

XML_SetUserData ( XML_Parser  parser,
void userData 
)

Definition at line 1167 of file xmlparse.c.

{
  if (handlerArg == userData)
    handlerArg = userData = p;
  else
    userData = p;
}
XML_SetXmlDeclHandler ( XML_Parser  parser,
XML_XmlDeclHandler  xmldecl 
)

Definition at line 1403 of file xmlparse.c.

XML_StopParser ( XML_Parser  parser,
XML_Bool  resumable 
) [abstract]

Definition at line 1674 of file xmlparse.c.

{
  switch (ps_parsing) {
  case XML_SUSPENDED:
    if (resumable) {
      errorCode = XML_ERROR_SUSPENDED;
      return XML_STATUS_ERROR;
    }
    ps_parsing = XML_FINISHED;
    break;
  case XML_FINISHED:
    errorCode = XML_ERROR_FINISHED;
    return XML_STATUS_ERROR;
  default:
    if (resumable) {
#ifdef XML_DTD
      if (isParamEntity) {
        errorCode = XML_ERROR_SUSPEND_PE;
        return XML_STATUS_ERROR;
      }
#endif
      ps_parsing = XML_SUSPENDED;
    }
    else
      ps_parsing = XML_FINISHED;
  }
  return XML_STATUS_OK;
}
XML_UseForeignDTD ( XML_Parser  parser,
XML_Bool  useDTD 
) [abstract]

Definition at line 1144 of file xmlparse.c.

{
#ifdef XML_DTD
  /* block after XML_Parse()/XML_ParseBuffer() has been called */
  if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED)
    return XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING;
  useForeignDTD = useDTD;
  return XML_ERROR_NONE;
#else
  return XML_ERROR_FEATURE_REQUIRES_XML_DTD;
#endif
}

Definition at line 1138 of file xmlparse.c.