Back to Turicreate

parser: the core parser module

deps/src/libxml2-2.9.1/doc/devhelp/libxml2-parser.html

6.4.175.3 KB
Original Source

| | | | | libxml2 Reference Manual |

parser

parser - the core parser module

Interfaces, constants and types related to the XML parser

Author(s): Daniel Veillard

Synopsis

#define[XML\_COMPLETE\_ATTRS](#XML_COMPLETE_ATTRS);
#define[XML\_SKIP\_IDS](#XML_SKIP_IDS);
#define[XML\_SAX2\_MAGIC](#XML_SAX2_MAGIC);
#define[XML\_DETECT\_IDS](#XML_DETECT_IDS);
#define[XML\_DEFAULT\_VERSION](#XML_DEFAULT_VERSION);
typedef[xmlParserNodeInfoSeq](libxml2-parser.html#xmlParserNodeInfoSeq)*[xmlParserNodeInfoSeqPtr](#xmlParserNodeInfoSeqPtr);
typedef struct _xmlSAXHandlerV1[xmlSAXHandlerV1](#xmlSAXHandlerV1);
typedef enum[xmlParserInputState](#xmlParserInputState);
typedef[xmlParserNodeInfo](libxml2-parser.html#xmlParserNodeInfo)*[xmlParserNodeInfoPtr](#xmlParserNodeInfoPtr);
typedef struct _xmlParserNodeInfoSeq[xmlParserNodeInfoSeq](#xmlParserNodeInfoSeq);
typedef enum[xmlFeature](#xmlFeature);
typedef enum[xmlParserMode](#xmlParserMode);
typedef enum[xmlParserOption](#xmlParserOption);
typedef[xmlSAXHandlerV1](libxml2-parser.html#xmlSAXHandlerV1)*[xmlSAXHandlerV1Ptr](#xmlSAXHandlerV1Ptr);
typedef struct _xmlParserNodeInfo[xmlParserNodeInfo](#xmlParserNodeInfo);
void[xmlSetupParserForBuffer](#xmlSetupParserForBuffer)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* buffer,
const char * filename);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlCtxtReadFile](#xmlCtxtReadFile)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const char * filename,
const char * encoding,
int options);
int[xmlParseCtxtExternalEntity](#xmlParseCtxtExternalEntity)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* URL,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ID,
[xmlNodePtr](libxml2-tree.html#xmlNodePtr)* lst);
typedef void[attributeDeclSAXFunc](#attributeDeclSAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* elem,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* fullname,
int type,
int def,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* defaultValue,
[xmlEnumerationPtr](libxml2-tree.html#xmlEnumerationPtr)tree);
typedef[xmlEntityPtr](libxml2-tree.html#xmlEntityPtr)[getEntitySAXFunc](#getEntitySAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name);
typedef void[startElementSAXFunc](#startElementSAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)** atts);
typedef void[charactersSAXFunc](#charactersSAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ch,
int len);
void[xmlClearNodeInfoSeq](#xmlClearNodeInfoSeq)([xmlParserNodeInfoSeqPtr](libxml2-parser.html#xmlParserNodeInfoSeqPtr)seq);
int[xmlParseChunk](#xmlParseChunk)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const char * chunk,
int size,
int terminate);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlParseEntity](#xmlParseEntity)(const char * filename);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlRecoverFile](#xmlRecoverFile)(const char * filename);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlCtxtReadDoc](#xmlCtxtReadDoc)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* cur,
const char * URL,
const char * encoding,
int options);
typedef void[startElementNsSAX2Func](#startElementNsSAX2Func)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* localname,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* prefix,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* URI,
int nb_namespaces,
const[xmlChar](libxml2-xmlstring.html#xmlChar)** namespaces,
int nb_attributes,
int nb_defaulted,
const[xmlChar](libxml2-xmlstring.html#xmlChar)** attributes);[xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)[xmlCreateIOParserCtxt](#xmlCreateIOParserCtxt)([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
void * user_data,
[xmlInputReadCallback](libxml2-xmlIO.html#xmlInputReadCallback)ioread,
[xmlInputCloseCallback](libxml2-xmlIO.html#xmlInputCloseCallback)ioclose,
void * ioctx,
[xmlCharEncoding](libxml2-encoding.html#xmlCharEncoding)enc);[xmlParserErrors](libxml2-xmlerror.html#xmlParserErrors)[xmlParseInNodeContext](#xmlParseInNodeContext)([xmlNodePtr](libxml2-tree.html#xmlNodePtr)node,
const char * data,
int datalen,
int options,
[xmlNodePtr](libxml2-tree.html#xmlNodePtr)* lst);
typedef void[referenceSAXFunc](#referenceSAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name);
typedef int[hasExternalSubsetSAXFunc](#hasExternalSubsetSAXFunc)(void * ctx);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlSAXParseDoc](#xmlSAXParseDoc)([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* cur,
int recovery);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlReadMemory](#xmlReadMemory)(const char * buffer,
int size,
const char * URL,
const char * encoding,
int options);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlParseMemory](#xmlParseMemory)(const char * buffer,
int size);[xmlParserInputPtr](libxml2-tree.html#xmlParserInputPtr)[xmlNewIOInputStream](#xmlNewIOInputStream)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
[xmlParserInputBufferPtr](libxml2-tree.html#xmlParserInputBufferPtr)input,
[xmlCharEncoding](libxml2-encoding.html#xmlCharEncoding)enc);
typedef void[processingInstructionSAXFunc](#processingInstructionSAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* target,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* data);
int[xmlParseBalancedChunkMemoryRecover](#xmlParseBalancedChunkMemoryRecover)([xmlDocPtr](libxml2-tree.html#xmlDocPtr)doc,
[xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
void * user_data,
int depth,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* string,
[xmlNodePtr](libxml2-tree.html#xmlNodePtr)* lst,
int recover);
void[xmlInitParser](#xmlInitParser)(void);[xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)[xmlCreateDocParserCtxt](#xmlCreateDocParserCtxt)(const[xmlChar](libxml2-xmlstring.html#xmlChar)* cur);
typedef void[errorSAXFunc](#errorSAXFunc)(void * ctx,
const char * msg,
... ...);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlSAXParseMemory](#xmlSAXParseMemory)([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
const char * buffer,
int size,
int recovery);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlRecoverMemory](#xmlRecoverMemory)(const char * buffer,
int size);
typedef[xmlParserInputPtr](libxml2-tree.html#xmlParserInputPtr)[xmlExternalEntityLoader](#xmlExternalEntityLoader)(const char * URL,
const char * ID,
[xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)context);
typedef int[hasInternalSubsetSAXFunc](#hasInternalSubsetSAXFunc)(void * ctx);
typedef void[cdataBlockSAXFunc](#cdataBlockSAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* value,
int len);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlSAXParseFile](#xmlSAXParseFile)([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
const char * filename,
int recovery);
typedef void[xmlParserInputDeallocate](#xmlParserInputDeallocate)([xmlChar](libxml2-xmlstring.html#xmlChar)* str);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlCtxtReadIO](#xmlCtxtReadIO)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
[xmlInputReadCallback](libxml2-xmlIO.html#xmlInputReadCallback)ioread,
[xmlInputCloseCallback](libxml2-xmlIO.html#xmlInputCloseCallback)ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlSAXParseMemoryWithData](#xmlSAXParseMemoryWithData)([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
const char * buffer,
int size,
int recovery,
void * data);
int[xmlGetFeature](#xmlGetFeature)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const char * name,
void * result);[xmlDtdPtr](libxml2-tree.html#xmlDtdPtr)[xmlIOParseDTD](#xmlIOParseDTD)([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
[xmlParserInputBufferPtr](libxml2-tree.html#xmlParserInputBufferPtr)input,
[xmlCharEncoding](libxml2-encoding.html#xmlCharEncoding)enc);
void[xmlFreeParserCtxt](#xmlFreeParserCtxt)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt);[xmlDtdPtr](libxml2-tree.html#xmlDtdPtr)[xmlParseDTD](#xmlParseDTD)(const[xmlChar](libxml2-xmlstring.html#xmlChar)* ExternalID,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* SystemID);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlRecoverDoc](#xmlRecoverDoc)(const[xmlChar](libxml2-xmlstring.html#xmlChar)* cur);
typedef void[commentSAXFunc](#commentSAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* value);
int[xmlInitParserCtxt](#xmlInitParserCtxt)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt);
typedef void[attributeSAXFunc](#attributeSAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* value);
int[xmlParserInputGrow](#xmlParserInputGrow)([xmlParserInputPtr](libxml2-tree.html#xmlParserInputPtr)in,
int len);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlCtxtReadMemory](#xmlCtxtReadMemory)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const char * buffer,
int size,
const char * URL,
const char * encoding,
int options);
typedef void[externalSubsetSAXFunc](#externalSubsetSAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ExternalID,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* SystemID);
typedef[xmlParserInputPtr](libxml2-tree.html#xmlParserInputPtr)[resolveEntitySAXFunc](#resolveEntitySAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* publicId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* systemId);
int[xmlPedanticParserDefault](#xmlPedanticParserDefault)(int val);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlSAXParseEntity](#xmlSAXParseEntity)([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
const char * filename);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlParseDoc](#xmlParseDoc)(const[xmlChar](libxml2-xmlstring.html#xmlChar)* cur);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlSAXParseFileWithData](#xmlSAXParseFileWithData)([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
const char * filename,
int recovery,
void * data);
int[xmlLineNumbersDefault](#xmlLineNumbersDefault)(int val);[xmlExternalEntityLoader](libxml2-parser.html#xmlExternalEntityLoader)[xmlGetExternalEntityLoader](#xmlGetExternalEntityLoader)(void);
typedef void[elementDeclSAXFunc](#elementDeclSAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
int type,
[xmlElementContentPtr](libxml2-tree.html#xmlElementContentPtr)content);
int[xmlCtxtUseOptions](#xmlCtxtUseOptions)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
int options);[xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)[xmlCreatePushParserCtxt](#xmlCreatePushParserCtxt)([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
void * user_data,
const char * chunk,
int size,
const char * filename);
void[xmlParserAddNodeInfo](#xmlParserAddNodeInfo)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const[xmlParserNodeInfoPtr](libxml2-parser.html#xmlParserNodeInfoPtr)info);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlCtxtReadFd](#xmlCtxtReadFd)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
int fd,
const char * URL,
const char * encoding,
int options);
typedef void[internalSubsetSAXFunc](#internalSubsetSAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ExternalID,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* SystemID);[xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)[xmlNewParserCtxt](#xmlNewParserCtxt)(void);
typedef void[endDocumentSAXFunc](#endDocumentSAXFunc)(void * ctx);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlParseFile](#xmlParseFile)(const char * filename);
int[xmlParseDocument](#xmlParseDocument)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt);
typedef void[setDocumentLocatorSAXFunc](#setDocumentLocatorSAXFunc)(void * ctx,
[xmlSAXLocatorPtr](libxml2-tree.html#xmlSAXLocatorPtr)loc);
typedef[xmlEntityPtr](libxml2-tree.html#xmlEntityPtr)[getParameterEntitySAXFunc](#getParameterEntitySAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name);
typedef void[ignorableWhitespaceSAXFunc](#ignorableWhitespaceSAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ch,
int len);
void[xmlInitNodeInfoSeq](#xmlInitNodeInfoSeq)([xmlParserNodeInfoSeqPtr](libxml2-parser.html#xmlParserNodeInfoSeqPtr)seq);
int[xmlSubstituteEntitiesDefault](#xmlSubstituteEntitiesDefault)(int val);
typedef void[endElementSAXFunc](#endElementSAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name);
unsigned long[xmlParserFindNodeInfoIndex](#xmlParserFindNodeInfoIndex)(const[xmlParserNodeInfoSeqPtr](libxml2-parser.html#xmlParserNodeInfoSeqPtr)seq,
const[xmlNodePtr](libxml2-tree.html#xmlNodePtr)node);
long[xmlByteConsumed](#xmlByteConsumed)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt);
void[xmlCtxtReset](#xmlCtxtReset)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt);
int[xmlSetFeature](#xmlSetFeature)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const char * name,
void * value);
int[xmlKeepBlanksDefault](#xmlKeepBlanksDefault)(int val);
int[xmlParserInputRead](#xmlParserInputRead)([xmlParserInputPtr](libxml2-tree.html#xmlParserInputPtr)in,
int len);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlReadFile](#xmlReadFile)(const char * filename,
const char * encoding,
int options);
int[xmlGetFeaturesList](#xmlGetFeaturesList)(int * len,
const char ** result);
int[xmlHasFeature](#xmlHasFeature)([xmlFeature](libxml2-parser.html#xmlFeature)feature);
typedef void[unparsedEntityDeclSAXFunc](#unparsedEntityDeclSAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* publicId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* systemId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* notationName);
int[xmlSAXUserParseFile](#xmlSAXUserParseFile)([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
void * user_data,
const char * filename);
typedef void[fatalErrorSAXFunc](#fatalErrorSAXFunc)(void * ctx,
const char * msg,
... ...);[xmlDtdPtr](libxml2-tree.html#xmlDtdPtr)[xmlSAXParseDTD](#xmlSAXParseDTD)([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ExternalID,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* SystemID);
const[xmlParserNodeInfo](libxml2-parser.html#xmlParserNodeInfo)*[xmlParserFindNodeInfo](#xmlParserFindNodeInfo)(const[xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctx,
const[xmlNodePtr](libxml2-tree.html#xmlNodePtr)node);
typedef void[entityDeclSAXFunc](#entityDeclSAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
int type,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* publicId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* systemId,
[xmlChar](libxml2-xmlstring.html#xmlChar)* content);[xmlParserInputPtr](libxml2-tree.html#xmlParserInputPtr)[xmlLoadExternalEntity](#xmlLoadExternalEntity)(const char * URL,
const char * ID,
[xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt);
void[xmlStopParser](#xmlStopParser)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlReadFd](#xmlReadFd)(int fd,
const char * URL,
const char * encoding,
int options);
int[xmlParseExtParsedEnt](#xmlParseExtParsedEnt)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlReadIO](#xmlReadIO)([xmlInputReadCallback](libxml2-xmlIO.html#xmlInputReadCallback)ioread,
[xmlInputCloseCallback](libxml2-xmlIO.html#xmlInputCloseCallback)ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options);[xmlDocPtr](libxml2-tree.html#xmlDocPtr)[xmlReadDoc](#xmlReadDoc)(const[xmlChar](libxml2-xmlstring.html#xmlChar)* cur,
const char * URL,
const char * encoding,
int options);
int[xmlSAXUserParseMemory](#xmlSAXUserParseMemory)([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
void * user_data,
const char * buffer,
int size);
int[xmlParseBalancedChunkMemory](#xmlParseBalancedChunkMemory)([xmlDocPtr](libxml2-tree.html#xmlDocPtr)doc,
[xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
void * user_data,
int depth,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* string,
[xmlNodePtr](libxml2-tree.html#xmlNodePtr)* lst);
typedef void[endElementNsSAX2Func](#endElementNsSAX2Func)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* localname,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* prefix,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* URI);
void[xmlCleanupParser](#xmlCleanupParser)(void);
int[xmlCtxtResetPush](#xmlCtxtResetPush)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const char * chunk,
int size,
const char * filename,
const char * encoding);
typedef int[isStandaloneSAXFunc](#isStandaloneSAXFunc)(void * ctx);
typedef void[startDocumentSAXFunc](#startDocumentSAXFunc)(void * ctx);
void[xmlClearParserCtxt](#xmlClearParserCtxt)([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt);
int[xmlParseExternalEntity](#xmlParseExternalEntity)([xmlDocPtr](libxml2-tree.html#xmlDocPtr)doc,
[xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
void * user_data,
int depth,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* URL,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ID,
[xmlNodePtr](libxml2-tree.html#xmlNodePtr)* lst);
typedef void[notationDeclSAXFunc](#notationDeclSAXFunc)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* publicId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* systemId);
typedef void[warningSAXFunc](#warningSAXFunc)(void * ctx,
const char * msg,
... ...);
void[xmlSetExternalEntityLoader](#xmlSetExternalEntityLoader)([xmlExternalEntityLoader](libxml2-parser.html#xmlExternalEntityLoader)f);

Description

Details

Macro XML_COMPLETE_ATTRS

#define[XML\_COMPLETE\_ATTRS](#XML_COMPLETE_ATTRS);

Bit in the loadsubset context field to tell to do complete the elements attributes lists with the ones defaulted from the DTDs. Use it to initialize xmlLoadExtDtdDefaultValue.


Macro XML_DEFAULT_VERSION

#define[XML\_DEFAULT\_VERSION](#XML_DEFAULT_VERSION);

The default version of XML used: 1.0


Macro XML_DETECT_IDS

#define[XML\_DETECT\_IDS](#XML_DETECT_IDS);

Bit in the loadsubset context field to tell to do ID/REFs lookups. Use it to initialize xmlLoadExtDtdDefaultValue.


Macro XML_SAX2_MAGIC

#define[XML\_SAX2\_MAGIC](#XML_SAX2_MAGIC);

Special constant found in SAX2 blocks initialized fields


Macro XML_SKIP_IDS

#define[XML\_SKIP\_IDS](#XML_SKIP_IDS);

Bit in the loadsubset context field to tell to not do ID/REFs registration. Used to initialize xmlLoadExtDtdDefaultValue in some special cases.


Enum xmlFeature

enum[xmlFeature](#xmlFeature){XML\_WITH\_THREAD= 1XML\_WITH\_TREE= 2XML\_WITH\_OUTPUT= 3XML\_WITH\_PUSH= 4XML\_WITH\_READER= 5XML\_WITH\_PATTERN= 6XML\_WITH\_WRITER= 7XML\_WITH\_SAX1= 8XML\_WITH\_FTP= 9XML\_WITH\_HTTP= 10XML\_WITH\_VALID= 11XML\_WITH\_HTML= 12XML\_WITH\_LEGACY= 13XML\_WITH\_C14N= 14XML\_WITH\_CATALOG= 15XML\_WITH\_XPATH= 16XML\_WITH\_XPTR= 17XML\_WITH\_XINCLUDE= 18XML\_WITH\_ICONV= 19XML\_WITH\_ISO8859X= 20XML\_WITH\_UNICODE= 21XML\_WITH\_REGEXP= 22XML\_WITH\_AUTOMATA= 23XML\_WITH\_EXPR= 24XML\_WITH\_SCHEMAS= 25XML\_WITH\_SCHEMATRON= 26XML\_WITH\_MODULES= 27XML\_WITH\_DEBUG= 28XML\_WITH\_DEBUG\_MEM= 29XML\_WITH\_DEBUG\_RUN= 30XML\_WITH\_ZLIB= 31XML\_WITH\_ICU= 32XML\_WITH\_LZMA= 33XML\_WITH\_NONE= 99999 /* just to be sure of allocation size */
};

Enum xmlParserInputState

enum[xmlParserInputState](#xmlParserInputState){XML\_PARSER\_EOF= -1 /* nothing is to be parsed */XML\_PARSER\_START= 0 /* nothing has been parsed */XML\_PARSER\_MISC= 1 /* Misc* before int subset */XML\_PARSER\_PI= 2 /* Within a processing instruction */XML\_PARSER\_DTD= 3 /* within some DTD content */XML\_PARSER\_PROLOG= 4 /* Misc* after internal subset */XML\_PARSER\_COMMENT= 5 /* within a comment */XML\_PARSER\_START\_TAG= 6 /* within a start tag */XML\_PARSER\_CONTENT= 7 /* within the content */XML\_PARSER\_CDATA\_SECTION= 8 /* within a CDATA section */XML\_PARSER\_END\_TAG= 9 /* within a closing tag */XML\_PARSER\_ENTITY\_DECL= 10 /* within an entity declaration */XML\_PARSER\_ENTITY\_VALUE= 11 /* within an entity value in a decl */XML\_PARSER\_ATTRIBUTE\_VALUE= 12 /* within an attribute value */XML\_PARSER\_SYSTEM\_LITERAL= 13 /* within a SYSTEM value */XML\_PARSER\_EPILOG= 14 /* the Misc* after the last end tag */XML\_PARSER\_IGNORE= 15 /* within an IGNORED section */XML\_PARSER\_PUBLIC\_LITERAL= 16 /* within a PUBLIC value */
};

Enum xmlParserMode

enum[xmlParserMode](#xmlParserMode){XML\_PARSE\_UNKNOWN= 0XML\_PARSE\_DOM= 1XML\_PARSE\_SAX= 2XML\_PARSE\_PUSH\_DOM= 3XML\_PARSE\_PUSH\_SAX= 4XML\_PARSE\_READER= 5
};

Structure xmlParserNodeInfo

struct _xmlParserNodeInfo {
    const struct _xmlNode *	node	: Position & line # that text that created the node begins & ends on
    unsigned long	begin_pos
    unsigned long	begin_line
    unsigned long	end_pos
    unsigned long	end_line
} xmlParserNodeInfo;

Typedef xmlParserNodeInfoPtr

[xmlParserNodeInfo](libxml2-parser.html#xmlParserNodeInfo)* xmlParserNodeInfoPtr;

Structure xmlParserNodeInfoSeq

struct _xmlParserNodeInfoSeq {
    unsigned long	maximum
    unsigned long	length[xmlParserNodeInfo](libxml2-parser.html#xmlParserNodeInfo)*	buffer
} xmlParserNodeInfoSeq;

Typedef xmlParserNodeInfoSeqPtr

[xmlParserNodeInfoSeq](libxml2-parser.html#xmlParserNodeInfoSeq)* xmlParserNodeInfoSeqPtr;

Enum xmlParserOption

enum[xmlParserOption](#xmlParserOption){XML\_PARSE\_RECOVER= 1 /* recover on errors */XML\_PARSE\_NOENT= 2 /* substitute entities */XML\_PARSE\_DTDLOAD= 4 /* load the external subset */XML\_PARSE\_DTDATTR= 8 /* default DTD attributes */XML\_PARSE\_DTDVALID= 16 /* validate with the DTD */XML\_PARSE\_NOERROR= 32 /* suppress error reports */XML\_PARSE\_NOWARNING= 64 /* suppress warning reports */XML\_PARSE\_PEDANTIC= 128 /* pedantic error reporting */XML\_PARSE\_NOBLANKS= 256 /* remove blank nodes */XML\_PARSE\_SAX1= 512 /* use the SAX1 interface internally */XML\_PARSE\_XINCLUDE= 1024 /* Implement XInclude substitition */XML\_PARSE\_NONET= 2048 /* Forbid network access */XML\_PARSE\_NODICT= 4096 /* Do not reuse the context dictionnary */XML\_PARSE\_NSCLEAN= 8192 /* remove redundant namespaces declarations */XML\_PARSE\_NOCDATA= 16384 /* merge CDATA as text nodes */XML\_PARSE\_NOXINCNODE= 32768 /* do not generate XINCLUDE START/END nodes */XML\_PARSE\_COMPACT= 65536 /* compact small text nodes; no modification of the tree allowed afterwards (will possibly crash if you try to modify the tree) */XML\_PARSE\_OLD10= 131072 /* parse using XML-1.0 before update 5 */XML\_PARSE\_NOBASEFIX= 262144 /* do not fixup XINCLUDE xml:base uris */XML\_PARSE\_HUGE= 524288 /* relax any hardcoded limit from the parser */XML\_PARSE\_OLDSAX= 1048576 /* parse using SAX2 interface before 2.7.0 */XML\_PARSE\_IGNORE\_ENC= 2097152 /* ignore internal document encoding hint */XML\_PARSE\_BIG\_LINES= 4194304 /* Store big lines numbers in text PSVI field */
};

Structure xmlSAXHandlerV1

struct _xmlSAXHandlerV1 {[internalSubsetSAXFunc](libxml2-parser.html#internalSubsetSAXFunc)internalSubset[isStandaloneSAXFunc](libxml2-parser.html#isStandaloneSAXFunc)isStandalone[hasInternalSubsetSAXFunc](libxml2-parser.html#hasInternalSubsetSAXFunc)hasInternalSubset[hasExternalSubsetSAXFunc](libxml2-parser.html#hasExternalSubsetSAXFunc)hasExternalSubset[resolveEntitySAXFunc](libxml2-parser.html#resolveEntitySAXFunc)resolveEntity[getEntitySAXFunc](libxml2-parser.html#getEntitySAXFunc)getEntity[entityDeclSAXFunc](libxml2-parser.html#entityDeclSAXFunc)entityDecl[notationDeclSAXFunc](libxml2-parser.html#notationDeclSAXFunc)notationDecl[attributeDeclSAXFunc](libxml2-parser.html#attributeDeclSAXFunc)attributeDecl[elementDeclSAXFunc](libxml2-parser.html#elementDeclSAXFunc)elementDecl[unparsedEntityDeclSAXFunc](libxml2-parser.html#unparsedEntityDeclSAXFunc)unparsedEntityDecl[setDocumentLocatorSAXFunc](libxml2-parser.html#setDocumentLocatorSAXFunc)setDocumentLocator[startDocumentSAXFunc](libxml2-parser.html#startDocumentSAXFunc)startDocument[endDocumentSAXFunc](libxml2-parser.html#endDocumentSAXFunc)endDocument[startElementSAXFunc](libxml2-parser.html#startElementSAXFunc)startElement[endElementSAXFunc](libxml2-parser.html#endElementSAXFunc)endElement[referenceSAXFunc](libxml2-parser.html#referenceSAXFunc)reference[charactersSAXFunc](libxml2-parser.html#charactersSAXFunc)characters[ignorableWhitespaceSAXFunc](libxml2-parser.html#ignorableWhitespaceSAXFunc)ignorableWhitespace[processingInstructionSAXFunc](libxml2-parser.html#processingInstructionSAXFunc)processingInstruction[commentSAXFunc](libxml2-parser.html#commentSAXFunc)comment[warningSAXFunc](libxml2-parser.html#warningSAXFunc)warning[errorSAXFunc](libxml2-parser.html#errorSAXFunc)error[fatalErrorSAXFunc](libxml2-parser.html#fatalErrorSAXFunc)fatalError	: unused error() get all the errors[getParameterEntitySAXFunc](libxml2-parser.html#getParameterEntitySAXFunc)getParameterEntity[cdataBlockSAXFunc](libxml2-parser.html#cdataBlockSAXFunc)cdataBlock[externalSubsetSAXFunc](libxml2-parser.html#externalSubsetSAXFunc)externalSubset
    unsigned int	initialized
} xmlSAXHandlerV1;

Typedef xmlSAXHandlerV1Ptr

[xmlSAXHandlerV1](libxml2-parser.html#xmlSAXHandlerV1)* xmlSAXHandlerV1Ptr;

Function type attributeDeclSAXFunc

void	attributeDeclSAXFunc (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* elem,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* fullname,
int type,
int def,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* defaultValue,
[xmlEnumerationPtr](libxml2-tree.html#xmlEnumerationPtr)tree)

An attribute definition has been parsed.

| ctx: | the user data (XML parser context) | | elem: | the name of the element | | fullname: | the attribute name | | type: | the attribute type | | def: | the type of default value | | defaultValue: | the attribute default value | | tree: | the tree of enumerated value set |


Function type attributeSAXFunc

void	attributeSAXFunc (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* value)

Handle an attribute that has been read by the parser. The default handling is to convert the attribute into an DOM subtree and past it in a new xmlAttr element added to the element.

| ctx: | the user data (XML parser context) | | name: | The attribute name, including namespace prefix | | value: | The attribute value |


Function type cdataBlockSAXFunc

void	cdataBlockSAXFunc (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* value,
int len)

Called when a pcdata block has been parsed.

| ctx: | the user data (XML parser context) | | value: | The pcdata content | | len: | the block length |


Function type charactersSAXFunc

void	charactersSAXFunc (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ch,
int len)

Receiving some chars from the parser.

| ctx: | the user data (XML parser context) | | ch: | a xmlChar string | | len: | the number of xmlChar |


Function type commentSAXFunc

void	commentSAXFunc (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* value)

A comment has been parsed.

| ctx: | the user data (XML parser context) | | value: | the comment content |


Function type elementDeclSAXFunc

void	elementDeclSAXFunc (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
int type,
[xmlElementContentPtr](libxml2-tree.html#xmlElementContentPtr)content)

An element definition has been parsed.

| ctx: | the user data (XML parser context) | | name: | the element name | | type: | the element type | | content: | the element value tree |


Function type endDocumentSAXFunc

void	endDocumentSAXFunc (void * ctx)

Called when the document end has been detected.

| ctx: | the user data (XML parser context) |


Function type endElementNsSAX2Func

void	endElementNsSAX2Func (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* localname,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* prefix,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* URI)

SAX2 callback when an element end has been detected by the parser. It provides the namespace informations for the element.

| ctx: | the user data (XML parser context) | | localname: | the local name of the element | | prefix: | the element namespace prefix if available | | URI: | the element namespace name if available |


Function type endElementSAXFunc

void	endElementSAXFunc (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name)

Called when the end of an element has been detected.

| ctx: | the user data (XML parser context) | | name: | The element name |


Function type entityDeclSAXFunc

void	entityDeclSAXFunc (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
int type,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* publicId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* systemId,
[xmlChar](libxml2-xmlstring.html#xmlChar)* content)

An entity definition has been parsed.

| ctx: | the user data (XML parser context) | | name: | the entity name | | type: | the entity type | | publicId: | The public ID of the entity | | systemId: | The system ID of the entity | | content: | the entity value (without processing). |


Function type errorSAXFunc

void	errorSAXFunc (void * ctx,
const char * msg,
... ...)

Display and format an error messages, callback.

| ctx: | an XML parser context | | msg: | the message to display/transmit | | ...: | extra parameters for the message display |


Function type externalSubsetSAXFunc

void	externalSubsetSAXFunc (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ExternalID,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* SystemID)

Callback on external subset declaration.

| ctx: | the user data (XML parser context) | | name: | the root element name | | ExternalID: | the external ID | | SystemID: | the SYSTEM ID (e.g. filename or URL) |


Function type fatalErrorSAXFunc

void	fatalErrorSAXFunc (void * ctx,
const char * msg,
... ...)

Display and format fatal error messages, callback. Note: so far fatalError() SAX callbacks are not used, error() get all the callbacks for errors.

| ctx: | an XML parser context | | msg: | the message to display/transmit | | ...: | extra parameters for the message display |


Function type getEntitySAXFunc

[xmlEntityPtr](libxml2-tree.html#xmlEntityPtr)getEntitySAXFunc	(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name)

Get an entity by name.

| ctx: | the user data (XML parser context) | | name: | The entity name | | Returns: | the xmlEntityPtr if found. |


Function type getParameterEntitySAXFunc

[xmlEntityPtr](libxml2-tree.html#xmlEntityPtr)getParameterEntitySAXFunc	(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name)

Get a parameter entity by name.

| ctx: | the user data (XML parser context) | | name: | The entity name | | Returns: | the xmlEntityPtr if found. |


Function type hasExternalSubsetSAXFunc

int	hasExternalSubsetSAXFunc	(void * ctx)

Does this document has an external subset?

| ctx: | the user data (XML parser context) | | Returns: | 1 if true |


Function type hasInternalSubsetSAXFunc

int	hasInternalSubsetSAXFunc	(void * ctx)

Does this document has an internal subset.

| ctx: | the user data (XML parser context) | | Returns: | 1 if true |


Function type ignorableWhitespaceSAXFunc

void	ignorableWhitespaceSAXFunc	(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ch,
int len)

Receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use characters.

| ctx: | the user data (XML parser context) | | ch: | a xmlChar string | | len: | the number of xmlChar |


Function type internalSubsetSAXFunc

void	internalSubsetSAXFunc (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ExternalID,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* SystemID)

Callback on internal subset declaration.

| ctx: | the user data (XML parser context) | | name: | the root element name | | ExternalID: | the external ID | | SystemID: | the SYSTEM ID (e.g. filename or URL) |


Function type isStandaloneSAXFunc

int	isStandaloneSAXFunc (void * ctx)

Is this document tagged standalone?

| ctx: | the user data (XML parser context) | | Returns: | 1 if true |


Function type notationDeclSAXFunc

void	notationDeclSAXFunc (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* publicId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* systemId)

What to do when a notation declaration has been parsed.

| ctx: | the user data (XML parser context) | | name: | The name of the notation | | publicId: | The public ID of the entity | | systemId: | The system ID of the entity |


Function type processingInstructionSAXFunc

void	processingInstructionSAXFunc	(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* target,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* data)

A processing instruction has been parsed.

| ctx: | the user data (XML parser context) | | target: | the target name | | data: | the PI data's |


Function type referenceSAXFunc

void	referenceSAXFunc (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name)

Called when an entity reference is detected.

| ctx: | the user data (XML parser context) | | name: | The entity name |


Function type resolveEntitySAXFunc

[xmlParserInputPtr](libxml2-tree.html#xmlParserInputPtr)resolveEntitySAXFunc	(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* publicId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* systemId)

Callback: The entity loader, to control the loading of external entities, the application can either: - override this resolveEntity() callback in the SAX block - or better use the xmlSetExternalEntityLoader() function to set up it's own entity resolution routine

| ctx: | the user data (XML parser context) | | publicId: | The public ID of the entity | | systemId: | The system ID of the entity | | Returns: | the xmlParserInputPtr if inlined or NULL for DOM behaviour. |


Function type setDocumentLocatorSAXFunc

void	setDocumentLocatorSAXFunc	(void * ctx,
[xmlSAXLocatorPtr](libxml2-tree.html#xmlSAXLocatorPtr)loc)

Receive the document locator at startup, actually xmlDefaultSAXLocator. Everything is available on the context, so this is useless in our case.

| ctx: | the user data (XML parser context) | | loc: | A SAX Locator |


Function type startDocumentSAXFunc

void	startDocumentSAXFunc (void * ctx)

Called when the document start being processed.

| ctx: | the user data (XML parser context) |


Function type startElementNsSAX2Func

void	startElementNsSAX2Func (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* localname,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* prefix,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* URI,
int nb_namespaces,
const[xmlChar](libxml2-xmlstring.html#xmlChar)** namespaces,
int nb_attributes,
int nb_defaulted,
const[xmlChar](libxml2-xmlstring.html#xmlChar)** attributes)

SAX2 callback when an element start has been detected by the parser. It provides the namespace informations for the element, as well as the new namespace declarations on the element.

| ctx: | the user data (XML parser context) | | localname: | the local name of the element | | prefix: | the element namespace prefix if available | | URI: | the element namespace name if available | | nb_namespaces: | number of namespace definitions on that node | | namespaces: | pointer to the array of prefix/URI pairs namespace definitions | | nb_attributes: | the number of attributes on that node | | nb_defaulted: | the number of defaulted attributes. The defaulted ones are at the end of the array | | attributes: | pointer to the array of (localname/prefix/URI/value/end) attribute values. |


Function type startElementSAXFunc

void	startElementSAXFunc (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)** atts)

Called when an opening tag has been processed.

| ctx: | the user data (XML parser context) | | name: | The element name, including namespace prefix | | atts: | An array of name/value attributes pairs, NULL terminated |


Function type unparsedEntityDeclSAXFunc

void	unparsedEntityDeclSAXFunc	(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* publicId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* systemId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* notationName)

What to do when an unparsed entity declaration is parsed.

| ctx: | the user data (XML parser context) | | name: | The name of the entity | | publicId: | The public ID of the entity | | systemId: | The system ID of the entity | | notationName: | the name of the notation |


Function type warningSAXFunc

void	warningSAXFunc (void * ctx,
const char * msg,
... ...)

Display and format a warning messages, callback.

| ctx: | an XML parser context | | msg: | the message to display/transmit | | ...: | extra parameters for the message display |


Function type xmlExternalEntityLoader

[xmlParserInputPtr](libxml2-tree.html#xmlParserInputPtr)xmlExternalEntityLoader	(const char * URL,
const char * ID,
[xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)context)

External entity loaders types.

| URL: | The System ID of the resource requested | | ID: | The Public ID of the resource requested | | context: | the XML parser context | | Returns: | the entity input parser. |


Function type xmlParserInputDeallocate

void	xmlParserInputDeallocate	([xmlChar](libxml2-xmlstring.html#xmlChar)* str)

Callback for freeing some parser input allocations.

| str: | the string to deallocate |


xmlByteConsumed ()

long	xmlByteConsumed ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt)

This function provides the current index of the parser relative to the start of the current entity. This function is computed in bytes from the beginning starting at zero and finishing at the size in byte of the file if parsing a file. The function is of constant cost if the input is UTF-8 but can be costly if run on non-UTF-8 input.

| ctxt: | an XML parser context | | Returns: | the index in bytes from the beginning of the entity or -1 in case the index could not be computed. |


xmlCleanupParser ()

void	xmlCleanupParser (void)

This function name is somewhat misleading. It does not clean up parser state, it cleans up memory allocated by the library itself. It is a cleanup function for the XML library. It tries to reclaim all related global memory allocated for the library processing. It doesn't deallocate any document related memory. One should call xmlCleanupParser() only when the process has finished using the library and all XML/HTML documents built with it. See also xmlInitParser() which has the opposite function of preparing the library for operations. WARNING: if your application is multithreaded or has plugin support calling this may crash the application if another thread or a plugin is still using libxml2. It's sometimes very hard to guess if libxml2 is in use in the application, some libraries or plugins may use it without notice. In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind !


xmlClearNodeInfoSeq ()

void	xmlClearNodeInfoSeq ([xmlParserNodeInfoSeqPtr](libxml2-parser.html#xmlParserNodeInfoSeqPtr)seq)

-- Clear (release memory and reinitialize) node info sequence

| seq: | a node info sequence pointer |


xmlClearParserCtxt ()

void	xmlClearParserCtxt ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt)

Clear (release owned resources) and reinitialize a parser context

| ctxt: | an XML parser context |


xmlCreateDocParserCtxt ()

[xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)xmlCreateDocParserCtxt	(const[xmlChar](libxml2-xmlstring.html#xmlChar)* cur)

Creates a parser context for an XML in-memory document.

| cur: | a pointer to an array of xmlChar | | Returns: | the new parser context or NULL |


xmlCreateIOParserCtxt ()

[xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)xmlCreateIOParserCtxt	([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
void * user_data,
[xmlInputReadCallback](libxml2-xmlIO.html#xmlInputReadCallback)ioread,
[xmlInputCloseCallback](libxml2-xmlIO.html#xmlInputCloseCallback)ioclose,
void * ioctx,
[xmlCharEncoding](libxml2-encoding.html#xmlCharEncoding)enc)

Create a parser context for using the XML parser with an existing I/O stream

| sax: | a SAX handler | | user_data: | The user data returned on SAX callbacks | | ioread: | an I/O read function | | ioclose: | an I/O close function | | ioctx: | an I/O handler | | enc: | the charset encoding if known | | Returns: | the new parser context or NULL |


xmlCreatePushParserCtxt ()

[xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)xmlCreatePushParserCtxt	([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
void * user_data,
const char * chunk,
int size,
const char * filename)

Create a parser context for using the XML parser in push mode. If @buffer and @size are non-NULL, the data is used to detect the encoding. The remaining characters will be parsed so they don't need to be fed in again through xmlParseChunk. To allow content encoding detection, @size should be >= 4 The value of @filename is used for fetching external entities and error/warning reports.

| sax: | a SAX handler | | user_data: | The user data returned on SAX callbacks | | chunk: | a pointer to an array of chars | | size: | number of chars in the array | | filename: | an optional file name or URI | | Returns: | the new parser context or NULL |


xmlCtxtReadDoc ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlCtxtReadDoc ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* cur,
const char * URL,
const char * encoding,
int options)

parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context

| ctxt: | an XML parser context | | cur: | a pointer to a zero terminated string | | URL: | the base URL to use for the document | | encoding: | the document encoding, or NULL | | options: | a combination of xmlParserOption | | Returns: | the resulting document tree |


xmlCtxtReadFd ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlCtxtReadFd ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
int fd,
const char * URL,
const char * encoding,
int options)

parse an XML from a file descriptor and build a tree. This reuses the existing @ctxt parser context NOTE that the file descriptor will not be closed when the reader is closed or reset.

| ctxt: | an XML parser context | | fd: | an open file descriptor | | URL: | the base URL to use for the document | | encoding: | the document encoding, or NULL | | options: | a combination of xmlParserOption | | Returns: | the resulting document tree |


xmlCtxtReadFile ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlCtxtReadFile ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const char * filename,
const char * encoding,
int options)

parse an XML file from the filesystem or the network. This reuses the existing @ctxt parser context

| ctxt: | an XML parser context | | filename: | a file or URL | | encoding: | the document encoding, or NULL | | options: | a combination of xmlParserOption | | Returns: | the resulting document tree |


xmlCtxtReadIO ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlCtxtReadIO ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
[xmlInputReadCallback](libxml2-xmlIO.html#xmlInputReadCallback)ioread,
[xmlInputCloseCallback](libxml2-xmlIO.html#xmlInputCloseCallback)ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options)

parse an XML document from I/O functions and source and build a tree. This reuses the existing @ctxt parser context

| ctxt: | an XML parser context | | ioread: | an I/O read function | | ioclose: | an I/O close function | | ioctx: | an I/O handler | | URL: | the base URL to use for the document | | encoding: | the document encoding, or NULL | | options: | a combination of xmlParserOption | | Returns: | the resulting document tree |


xmlCtxtReadMemory ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlCtxtReadMemory	([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const char * buffer,
int size,
const char * URL,
const char * encoding,
int options)

parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context

| ctxt: | an XML parser context | | buffer: | a pointer to a char array | | size: | the size of the array | | URL: | the base URL to use for the document | | encoding: | the document encoding, or NULL | | options: | a combination of xmlParserOption | | Returns: | the resulting document tree |


xmlCtxtReset ()

void	xmlCtxtReset ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt)

Reset a parser context

| ctxt: | an XML parser context |


xmlCtxtResetPush ()

int	xmlCtxtResetPush ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const char * chunk,
int size,
const char * filename,
const char * encoding)

Reset a push parser context

| ctxt: | an XML parser context | | chunk: | a pointer to an array of chars | | size: | number of chars in the array | | filename: | an optional file name or URI | | encoding: | the document encoding, or NULL | | Returns: | 0 in case of success and 1 in case of error |


xmlCtxtUseOptions ()

int	xmlCtxtUseOptions ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
int options)

Applies the options to the parser context

| ctxt: | an XML parser context | | options: | a combination of xmlParserOption | | Returns: | 0 in case of success, the set of unknown or unimplemented options in case of error. |


xmlFreeParserCtxt ()

void	xmlFreeParserCtxt ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt)

Free all the memory used by a parser context. However the parsed document in ctxt->myDoc is not freed.

| ctxt: | an XML parser context |


xmlGetExternalEntityLoader ()

[xmlExternalEntityLoader](libxml2-parser.html#xmlExternalEntityLoader)xmlGetExternalEntityLoader	(void)

Get the default external entity resolver function for the application

| Returns: | the xmlExternalEntityLoader function pointer |


xmlGetFeature ()

int	xmlGetFeature ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const char * name,
void * result)

Read the current value of one feature of this parser instance

| ctxt: | an XML/HTML parser context | | name: | the feature name | | result: | location to store the result | | Returns: | -1 in case or error, 0 otherwise |


xmlGetFeaturesList ()

int	xmlGetFeaturesList (int * len,
const char ** result)

Copy at most *@len feature names into the @result array

| len: | the length of the features name array (input/output) | | result: | an array of string to be filled with the features name. | | Returns: | -1 in case or error, or the total number of features, len is updated with the number of strings copied, strings must not be deallocated |


xmlHasFeature ()

int	xmlHasFeature ([xmlFeature](libxml2-parser.html#xmlFeature)feature)

Examines if the library has been compiled with a given feature.

| feature: | the feature to be examined | | Returns: | a non-zero value if the feature exist, otherwise zero. Returns zero (0) if the feature does not exist or an unknown unknown feature is requested, non-zero otherwise. |


xmlIOParseDTD ()

[xmlDtdPtr](libxml2-tree.html#xmlDtdPtr)xmlIOParseDTD ([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
[xmlParserInputBufferPtr](libxml2-tree.html#xmlParserInputBufferPtr)input,
[xmlCharEncoding](libxml2-encoding.html#xmlCharEncoding)enc)

Load and parse a DTD

| sax: | the SAX handler block or NULL | | input: | an Input Buffer | | enc: | the charset encoding if known | | Returns: | the resulting xmlDtdPtr or NULL in case of error. @input will be freed by the function in any case. |


xmlInitNodeInfoSeq ()

void	xmlInitNodeInfoSeq ([xmlParserNodeInfoSeqPtr](libxml2-parser.html#xmlParserNodeInfoSeqPtr)seq)

-- Initialize (set to initial state) node info sequence

| seq: | a node info sequence pointer |


xmlInitParser ()

void	xmlInitParser (void)

Initialization function for the XML parser. This is not reentrant. Call once before processing in case of use in multithreaded programs.


xmlInitParserCtxt ()

int	xmlInitParserCtxt ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt)

Initialize a parser context

| ctxt: | an XML parser context | | Returns: | 0 in case of success and -1 in case of error |


xmlKeepBlanksDefault ()

int	xmlKeepBlanksDefault (int val)

Set and return the previous value for default blanks text nodes support. The 1.x version of the parser used an heuristic to try to detect ignorable white spaces. As a result the SAX callback was generating xmlSAX2IgnorableWhitespace() callbacks instead of characters() one, and when using the DOM output text nodes containing those blanks were not generated. The 2.x and later version will switch to the XML standard way and ignorableWhitespace() are only generated when running the parser in validating mode and when the current element doesn't allow CDATA or mixed content. This function is provided as a way to force the standard behavior on 1.X libs and to switch back to the old mode for compatibility when running 1.X client code on 2.X . Upgrade of 1.X code should be done by using xmlIsBlankNode() commodity function to detect the "empty" nodes generated. This value also affect autogeneration of indentation when saving code if blanks sections are kept, indentation is not generated.

| val: | int 0 or 1 | | Returns: | the last value for 0 for no substitution, 1 for substitution. |


xmlLineNumbersDefault ()

int	xmlLineNumbersDefault (int val)

Set and return the previous value for enabling line numbers in elements contents. This may break on old application and is turned off by default.

| val: | int 0 or 1 | | Returns: | the last value for 0 for no substitution, 1 for substitution. |


xmlLoadExternalEntity ()

[xmlParserInputPtr](libxml2-tree.html#xmlParserInputPtr)xmlLoadExternalEntity	(const char * URL,
const char * ID,
[xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt)

Load an external entity, note that the use of this function for unparsed entities may generate problems

| URL: | the URL for the entity to load | | ID: | the Public ID for the entity to load | | ctxt: | the context in which the entity is called or NULL | | Returns: | the xmlParserInputPtr or NULL |


xmlNewIOInputStream ()

[xmlParserInputPtr](libxml2-tree.html#xmlParserInputPtr)xmlNewIOInputStream	([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
[xmlParserInputBufferPtr](libxml2-tree.html#xmlParserInputBufferPtr)input,
[xmlCharEncoding](libxml2-encoding.html#xmlCharEncoding)enc)

Create a new input stream structure encapsulating the @input into a stream suitable for the parser.

| ctxt: | an XML parser context | | input: | an I/O Input | | enc: | the charset encoding if known | | Returns: | the new input stream or NULL |


xmlNewParserCtxt ()

[xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)xmlNewParserCtxt	(void)

Allocate and initialize a new parser context.

| Returns: | the xmlParserCtxtPtr or NULL |


xmlParseBalancedChunkMemory ()

int	xmlParseBalancedChunkMemory	([xmlDocPtr](libxml2-tree.html#xmlDocPtr)doc,
[xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
void * user_data,
int depth,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* string,
[xmlNodePtr](libxml2-tree.html#xmlNodePtr)* lst)

Parse a well-balanced chunk of an XML document called by the parser The allowed sequence for the Well Balanced Chunk is the one defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*

| doc: | the document the chunk pertains to | | sax: | the SAX handler bloc (possibly NULL) | | user_data: | The user data returned on SAX callbacks (possibly NULL) | | depth: | Used for loop detection, use 0 | | string: | the input string in UTF8 or ISO-Latin (zero terminated) | | lst: | the return value for the set of parsed nodes | | Returns: | 0 if the chunk is well balanced, -1 in case of args problem and the parser error code otherwise |


xmlParseBalancedChunkMemoryRecover ()

int	xmlParseBalancedChunkMemoryRecover	([xmlDocPtr](libxml2-tree.html#xmlDocPtr)doc,
[xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
void * user_data,
int depth,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* string,
[xmlNodePtr](libxml2-tree.html#xmlNodePtr)* lst,
int recover)

Parse a well-balanced chunk of an XML document called by the parser The allowed sequence for the Well Balanced Chunk is the one defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*

| doc: | the document the chunk pertains to | | sax: | the SAX handler bloc (possibly NULL) | | user_data: | The user data returned on SAX callbacks (possibly NULL) | | depth: | Used for loop detection, use 0 | | string: | the input string in UTF8 or ISO-Latin (zero terminated) | | lst: | the return value for the set of parsed nodes | | recover: | return nodes even if the data is broken (use 0) | | Returns: | 0 if the chunk is well balanced, -1 in case of args problem and the parser error code otherwise In case recover is set to 1, the nodelist will not be empty even if the parsed chunk is not well balanced, assuming the parsing succeeded to some extent. |


xmlParseChunk ()

int	xmlParseChunk ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const char * chunk,
int size,
int terminate)

Parse a Chunk of memory

| ctxt: | an XML parser context | | chunk: | an char array | | size: | the size in byte of the chunk | | terminate: | last chunk indicator | | Returns: | zero if no error, the xmlParserErrors otherwise. |


xmlParseCtxtExternalEntity ()

int	xmlParseCtxtExternalEntity	([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* URL,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ID,
[xmlNodePtr](libxml2-tree.html#xmlNodePtr)* lst)

Parse an external general entity within an existing parsing context An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content

| ctx: | the existing parsing context | | URL: | the URL for the entity to load | | ID: | the System ID for the entity to load | | lst: | the return value for the set of parsed nodes | | Returns: | 0 if the entity is well formed, -1 in case of args problem and the parser error code otherwise |


xmlParseDTD ()

[xmlDtdPtr](libxml2-tree.html#xmlDtdPtr)xmlParseDTD (const[xmlChar](libxml2-xmlstring.html#xmlChar)* ExternalID,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* SystemID)

Load and parse an external subset.

| ExternalID: | a NAME* containing the External ID of the DTD | | SystemID: | a NAME* containing the URL to the DTD | | Returns: | the resulting xmlDtdPtr or NULL in case of error. |


xmlParseDoc ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlParseDoc (const[xmlChar](libxml2-xmlstring.html#xmlChar)* cur)

parse an XML in-memory document and build a tree.

| cur: | a pointer to an array of xmlChar | | Returns: | the resulting document tree |


xmlParseDocument ()

int	xmlParseDocument ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt)

parse an XML document (and build a tree if using the standard SAX interface). [1] document ::= prolog element Misc* [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?

| ctxt: | an XML parser context | | Returns: | 0, -1 in case of error. the parser context is augmented as a result of the parsing. |


xmlParseEntity ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlParseEntity (const char * filename)

parse an XML external entity out of context and build a tree. [78] extParsedEnt ::= TextDecl? content This correspond to a "Well Balanced" chunk

| filename: | the filename | | Returns: | the resulting document tree |


xmlParseExtParsedEnt ()

int	xmlParseExtParsedEnt ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt)

parse a general parsed entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content

| ctxt: | an XML parser context | | Returns: | 0, -1 in case of error. the parser context is augmented as a result of the parsing. |


xmlParseExternalEntity ()

int	xmlParseExternalEntity ([xmlDocPtr](libxml2-tree.html#xmlDocPtr)doc,
[xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
void * user_data,
int depth,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* URL,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ID,
[xmlNodePtr](libxml2-tree.html#xmlNodePtr)* lst)

Parse an external general entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content

| doc: | the document the chunk pertains to | | sax: | the SAX handler bloc (possibly NULL) | | user_data: | The user data returned on SAX callbacks (possibly NULL) | | depth: | Used for loop detection, use 0 | | URL: | the URL for the entity to load | | ID: | the System ID for the entity to load | | lst: | the return value for the set of parsed nodes | | Returns: | 0 if the entity is well formed, -1 in case of args problem and the parser error code otherwise |


xmlParseFile ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlParseFile (const char * filename)

parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.

| filename: | the filename | | Returns: | the resulting document tree if the file was wellformed, NULL otherwise. |


xmlParseInNodeContext ()

[xmlParserErrors](libxml2-xmlerror.html#xmlParserErrors)xmlParseInNodeContext	([xmlNodePtr](libxml2-tree.html#xmlNodePtr)node,
const char * data,
int datalen,
int options,
[xmlNodePtr](libxml2-tree.html#xmlNodePtr)* lst)

Parse a well-balanced chunk of an XML document within the context (DTD, namespaces, etc ...) of the given node. The allowed sequence for the data is a Well Balanced Chunk defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*

| node: | the context node | | data: | the input string | | datalen: | the input string length in bytes | | options: | a combination of xmlParserOption | | lst: | the return value for the set of parsed nodes | | Returns: | XML_ERR_OK if the chunk is well balanced, and the parser error code otherwise |


xmlParseMemory ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlParseMemory (const char * buffer,
int size)

parse an XML in-memory block and build a tree.

| buffer: | an pointer to a char array | | size: | the size of the array | | Returns: | the resulting document tree |


xmlParserAddNodeInfo ()

void	xmlParserAddNodeInfo ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const[xmlParserNodeInfoPtr](libxml2-parser.html#xmlParserNodeInfoPtr)info)

Insert node info record into the sorted sequence

| ctxt: | an XML parser context | | info: | a node info sequence pointer |


xmlParserFindNodeInfo ()

const[xmlParserNodeInfo](libxml2-parser.html#xmlParserNodeInfo)*	xmlParserFindNodeInfo	(const[xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctx,
const[xmlNodePtr](libxml2-tree.html#xmlNodePtr)node)

Find the parser node info struct for a given node

| ctx: | an XML parser context | | node: | an XML node within the tree | | Returns: | an xmlParserNodeInfo block pointer or NULL |


xmlParserFindNodeInfoIndex ()

unsigned long	xmlParserFindNodeInfoIndex	(const[xmlParserNodeInfoSeqPtr](libxml2-parser.html#xmlParserNodeInfoSeqPtr)seq,
const[xmlNodePtr](libxml2-tree.html#xmlNodePtr)node)

xmlParserFindNodeInfoIndex : Find the index that the info record for the given node is or should be at in a sorted sequence

| seq: | a node info sequence pointer | | node: | an XML node pointer | | Returns: | a long indicating the position of the record |


xmlParserInputGrow ()

int	xmlParserInputGrow ([xmlParserInputPtr](libxml2-tree.html#xmlParserInputPtr)in,
int len)

This function increase the input for the parser. It tries to preserve pointers to the input buffer, and keep already read data

| in: | an XML parser input | | len: | an indicative size for the lookahead | | Returns: | the amount of char read, or -1 in case of error, 0 indicate the end of this entity |


xmlParserInputRead ()

int	xmlParserInputRead ([xmlParserInputPtr](libxml2-tree.html#xmlParserInputPtr)in,
int len)

This function was internal and is deprecated.

| in: | an XML parser input | | len: | an indicative size for the lookahead | | Returns: | -1 as this is an error to use it. |


xmlPedanticParserDefault ()

int	xmlPedanticParserDefault	(int val)

Set and return the previous value for enabling pedantic warnings.

| val: | int 0 or 1 | | Returns: | the last value for 0 for no substitution, 1 for substitution. |


xmlReadDoc ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlReadDoc (const[xmlChar](libxml2-xmlstring.html#xmlChar)* cur,
const char * URL,
const char * encoding,
int options)

parse an XML in-memory document and build a tree.

| cur: | a pointer to a zero terminated string | | URL: | the base URL to use for the document | | encoding: | the document encoding, or NULL | | options: | a combination of xmlParserOption | | Returns: | the resulting document tree |


xmlReadFd ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlReadFd (int fd,
const char * URL,
const char * encoding,
int options)

parse an XML from a file descriptor and build a tree. NOTE that the file descriptor will not be closed when the reader is closed or reset.

| fd: | an open file descriptor | | URL: | the base URL to use for the document | | encoding: | the document encoding, or NULL | | options: | a combination of xmlParserOption | | Returns: | the resulting document tree |


xmlReadFile ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlReadFile (const char * filename,
const char * encoding,
int options)

parse an XML file from the filesystem or the network.

| filename: | a file or URL | | encoding: | the document encoding, or NULL | | options: | a combination of xmlParserOption | | Returns: | the resulting document tree |


xmlReadIO ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlReadIO ([xmlInputReadCallback](libxml2-xmlIO.html#xmlInputReadCallback)ioread,
[xmlInputCloseCallback](libxml2-xmlIO.html#xmlInputCloseCallback)ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options)

parse an XML document from I/O functions and source and build a tree.

| ioread: | an I/O read function | | ioclose: | an I/O close function | | ioctx: | an I/O handler | | URL: | the base URL to use for the document | | encoding: | the document encoding, or NULL | | options: | a combination of xmlParserOption | | Returns: | the resulting document tree |


xmlReadMemory ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlReadMemory (const char * buffer,
int size,
const char * URL,
const char * encoding,
int options)

parse an XML in-memory document and build a tree.

| buffer: | a pointer to a char array | | size: | the size of the array | | URL: | the base URL to use for the document | | encoding: | the document encoding, or NULL | | options: | a combination of xmlParserOption | | Returns: | the resulting document tree |


xmlRecoverDoc ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlRecoverDoc (const[xmlChar](libxml2-xmlstring.html#xmlChar)* cur)

parse an XML in-memory document and build a tree. In the case the document is not Well Formed, a attempt to build a tree is tried anyway

| cur: | a pointer to an array of xmlChar | | Returns: | the resulting document tree or NULL in case of failure |


xmlRecoverFile ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlRecoverFile (const char * filename)

parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. In the case the document is not Well Formed, it attempts to build a tree anyway

| filename: | the filename | | Returns: | the resulting document tree or NULL in case of failure |


xmlRecoverMemory ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlRecoverMemory	(const char * buffer,
int size)

parse an XML in-memory block and build a tree. In the case the document is not Well Formed, an attempt to build a tree is tried anyway

| buffer: | an pointer to a char array | | size: | the size of the array | | Returns: | the resulting document tree or NULL in case of error |


xmlSAXParseDTD ()

[xmlDtdPtr](libxml2-tree.html#xmlDtdPtr)xmlSAXParseDTD ([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ExternalID,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* SystemID)

Load and parse an external subset.

| sax: | the SAX handler block | | ExternalID: | a NAME* containing the External ID of the DTD | | SystemID: | a NAME* containing the URL to the DTD | | Returns: | the resulting xmlDtdPtr or NULL in case of error. |


xmlSAXParseDoc ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlSAXParseDoc ([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* cur,
int recovery)

parse an XML in-memory document and build a tree. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.

| sax: | the SAX handler block | | cur: | a pointer to an array of xmlChar | | recovery: | work in recovery mode, i.e. tries to read no Well Formed documents | | Returns: | the resulting document tree |


xmlSAXParseEntity ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlSAXParseEntity	([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
const char * filename)

parse an XML external entity out of context and build a tree. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. [78] extParsedEnt ::= TextDecl? content This correspond to a "Well Balanced" chunk

| sax: | the SAX handler block | | filename: | the filename | | Returns: | the resulting document tree |


xmlSAXParseFile ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlSAXParseFile ([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
const char * filename,
int recovery)

parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.

| sax: | the SAX handler block | | filename: | the filename | | recovery: | work in recovery mode, i.e. tries to read no Well Formed documents | | Returns: | the resulting document tree |


xmlSAXParseFileWithData ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlSAXParseFileWithData	([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
const char * filename,
int recovery,
void * data)

parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. User data (void *) is stored within the parser context in the context's _private member, so it is available nearly everywhere in libxml

| sax: | the SAX handler block | | filename: | the filename | | recovery: | work in recovery mode, i.e. tries to read no Well Formed documents | | data: | the userdata | | Returns: | the resulting document tree |


xmlSAXParseMemory ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlSAXParseMemory	([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
const char * buffer,
int size,
int recovery)

parse an XML in-memory block and use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.

| sax: | the SAX handler block | | buffer: | an pointer to a char array | | size: | the size of the array | | recovery: | work in recovery mode, i.e. tries to read not Well Formed documents | | Returns: | the resulting document tree |


xmlSAXParseMemoryWithData ()

[xmlDocPtr](libxml2-tree.html#xmlDocPtr)xmlSAXParseMemoryWithData	([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
const char * buffer,
int size,
int recovery,
void * data)

parse an XML in-memory block and use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. User data (void *) is stored within the parser context in the context's _private member, so it is available nearly everywhere in libxml

| sax: | the SAX handler block | | buffer: | an pointer to a char array | | size: | the size of the array | | recovery: | work in recovery mode, i.e. tries to read no Well Formed documents | | data: | the userdata | | Returns: | the resulting document tree |


xmlSAXUserParseFile ()

int	xmlSAXUserParseFile ([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
void * user_data,
const char * filename)

parse an XML file and call the given SAX handler routines. Automatic support for ZLIB/Compress compressed document is provided

| sax: | a SAX handler | | user_data: | The user data returned on SAX callbacks | | filename: | a file name | | Returns: | 0 in case of success or a error number otherwise |


xmlSAXUserParseMemory ()

int	xmlSAXUserParseMemory ([xmlSAXHandlerPtr](libxml2-tree.html#xmlSAXHandlerPtr)sax,
void * user_data,
const char * buffer,
int size)

A better SAX parsing routine. parse an XML in-memory buffer and call the given SAX handler routines.

| sax: | a SAX handler | | user_data: | The user data returned on SAX callbacks | | buffer: | an in-memory XML document input | | size: | the length of the XML document in bytes | | Returns: | 0 in case of success or a error number otherwise |


xmlSetExternalEntityLoader ()

void	xmlSetExternalEntityLoader	([xmlExternalEntityLoader](libxml2-parser.html#xmlExternalEntityLoader)f)

Changes the defaultexternal entity resolver function for the application

| f: | the new entity resolver function |


xmlSetFeature ()

int	xmlSetFeature ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const char * name,
void * value)

Change the current value of one feature of this parser instance

| ctxt: | an XML/HTML parser context | | name: | the feature name | | value: | pointer to the location of the new value | | Returns: | -1 in case or error, 0 otherwise |


xmlSetupParserForBuffer ()

void	xmlSetupParserForBuffer ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* buffer,
const char * filename)

Setup the parser context to parse a new buffer; Clears any prior contents from the parser context. The buffer parameter must not be NULL, but the filename parameter can be

| ctxt: | an XML parser context | | buffer: | a xmlChar * buffer | | filename: | a file name |


xmlStopParser ()

void	xmlStopParser ([xmlParserCtxtPtr](libxml2-tree.html#xmlParserCtxtPtr)ctxt)

Blocks further parser processing

| ctxt: | an XML parser context |


xmlSubstituteEntitiesDefault ()

int	xmlSubstituteEntitiesDefault	(int val)

Set and return the previous value for default entity support. Initially the parser always keep entity references instead of substituting entity values in the output. This function has to be used to change the default parser behavior SAX::substituteEntities() has to be used for changing that on a file by file basis.

| val: | int 0 or 1 | | Returns: | the last value for 0 for no substitution, 1 for substitution. |