Blame doc/devhelp/libxml2-parser.html

Packit 423ecb
Packit 423ecb
<html>
Packit 423ecb
  <head>
Packit 423ecb
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
Packit 423ecb
    <title>parser: the core parser module</title>
Packit 423ecb
    <meta name="generator" content="Libxml2 devhelp stylesheet"/>
Packit 423ecb
    <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
Packit 423ecb
    <link rel="up" href="general.html" title="API"/>
Packit 423ecb
    <link rel="stylesheet" href="style.css" type="text/css"/>
Packit 423ecb
    <link rel="chapter" href="general.html" title="API"/>
Packit 423ecb
  </head>
Packit 423ecb
  <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit 423ecb
    
Packit 423ecb
      
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Prev
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Up
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Home
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Next
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        libxml2 Reference Manual
Packit 423ecb
      
Packit 423ecb
    
Packit 423ecb
    

Packit 423ecb
      parser
Packit 423ecb
    
Packit 423ecb
    

parser - the core parser module

Packit 423ecb
    

Interfaces, constants and types related to the XML parser

Packit 423ecb
    

Author(s): Daniel Veillard

Packit 423ecb
    
Packit 423ecb
      

Synopsis

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

Description

Packit 423ecb
    
Packit 423ecb
    
Packit 423ecb
      

Details

Packit 423ecb
      
Packit 423ecb
        

Macro XML_COMPLETE_ATTRS

#define XML_COMPLETE_ATTRS;
Packit 423ecb

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.

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Macro XML_DEFAULT_VERSION

#define XML_DEFAULT_VERSION;
Packit 423ecb

The default version of XML used: 1.0

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Macro XML_DETECT_IDS

#define XML_DETECT_IDS;
Packit 423ecb

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

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Macro XML_SAX2_MAGIC

#define XML_SAX2_MAGIC;
Packit 423ecb

Special constant found in SAX2 blocks initialized fields

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Macro XML_SKIP_IDS

#define XML_SKIP_IDS;
Packit 423ecb

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

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Enum xmlFeature

enum xmlFeature {
Packit 423ecb
    XML_WITH_THREAD = 1
Packit 423ecb
    XML_WITH_TREE = 2
Packit 423ecb
    XML_WITH_OUTPUT = 3
Packit 423ecb
    XML_WITH_PUSH = 4
Packit 423ecb
    XML_WITH_READER = 5
Packit 423ecb
    XML_WITH_PATTERN = 6
Packit 423ecb
    XML_WITH_WRITER = 7
Packit 423ecb
    XML_WITH_SAX1 = 8
Packit 423ecb
    XML_WITH_FTP = 9
Packit 423ecb
    XML_WITH_HTTP = 10
Packit 423ecb
    XML_WITH_VALID = 11
Packit 423ecb
    XML_WITH_HTML = 12
Packit 423ecb
    XML_WITH_LEGACY = 13
Packit 423ecb
    XML_WITH_C14N = 14
Packit 423ecb
    XML_WITH_CATALOG = 15
Packit 423ecb
    XML_WITH_XPATH = 16
Packit 423ecb
    XML_WITH_XPTR = 17
Packit 423ecb
    XML_WITH_XINCLUDE = 18
Packit 423ecb
    XML_WITH_ICONV = 19
Packit 423ecb
    XML_WITH_ISO8859X = 20
Packit 423ecb
    XML_WITH_UNICODE = 21
Packit 423ecb
    XML_WITH_REGEXP = 22
Packit 423ecb
    XML_WITH_AUTOMATA = 23
Packit 423ecb
    XML_WITH_EXPR = 24
Packit 423ecb
    XML_WITH_SCHEMAS = 25
Packit 423ecb
    XML_WITH_SCHEMATRON = 26
Packit 423ecb
    XML_WITH_MODULES = 27
Packit 423ecb
    XML_WITH_DEBUG = 28
Packit 423ecb
    XML_WITH_DEBUG_MEM = 29
Packit 423ecb
    XML_WITH_DEBUG_RUN = 30
Packit 423ecb
    XML_WITH_ZLIB = 31
Packit 423ecb
    XML_WITH_ICU = 32
Packit 423ecb
    XML_WITH_LZMA = 33
Packit 423ecb
    XML_WITH_NONE = 99999 /*  just to be sure of allocation size */
Packit 423ecb
};
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Enum xmlParserInputState

enum xmlParserInputState {
Packit 423ecb
    XML_PARSER_EOF = -1 /* nothing is to be parsed */
Packit 423ecb
    XML_PARSER_START = 0 /* nothing has been parsed */
Packit 423ecb
    XML_PARSER_MISC = 1 /* Misc* before int subset */
Packit 423ecb
    XML_PARSER_PI = 2 /* Within a processing instruction */
Packit 423ecb
    XML_PARSER_DTD = 3 /* within some DTD content */
Packit 423ecb
    XML_PARSER_PROLOG = 4 /* Misc* after internal subset */
Packit 423ecb
    XML_PARSER_COMMENT = 5 /* within a comment */
Packit 423ecb
    XML_PARSER_START_TAG = 6 /* within a start tag */
Packit 423ecb
    XML_PARSER_CONTENT = 7 /* within the content */
Packit 423ecb
    XML_PARSER_CDATA_SECTION = 8 /* within a CDATA section */
Packit 423ecb
    XML_PARSER_END_TAG = 9 /* within a closing tag */
Packit 423ecb
    XML_PARSER_ENTITY_DECL = 10 /* within an entity declaration */
Packit 423ecb
    XML_PARSER_ENTITY_VALUE = 11 /* within an entity value in a decl */
Packit 423ecb
    XML_PARSER_ATTRIBUTE_VALUE = 12 /* within an attribute value */
Packit 423ecb
    XML_PARSER_SYSTEM_LITERAL = 13 /* within a SYSTEM value */
Packit 423ecb
    XML_PARSER_EPILOG = 14 /* the Misc* after the last end tag */
Packit 423ecb
    XML_PARSER_IGNORE = 15 /* within an IGNORED section */
Packit 423ecb
    XML_PARSER_PUBLIC_LITERAL = 16 /*  within a PUBLIC value */
Packit 423ecb
};
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Enum xmlParserMode

enum xmlParserMode {
Packit 423ecb
    XML_PARSE_UNKNOWN = 0
Packit 423ecb
    XML_PARSE_DOM = 1
Packit 423ecb
    XML_PARSE_SAX = 2
Packit 423ecb
    XML_PARSE_PUSH_DOM = 3
Packit 423ecb
    XML_PARSE_PUSH_SAX = 4
Packit 423ecb
    XML_PARSE_READER = 5
Packit 423ecb
};
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Structure xmlParserNodeInfo

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

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef xmlParserNodeInfoPtr

xmlParserNodeInfo * xmlParserNodeInfoPtr;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Structure xmlParserNodeInfoSeq

struct _xmlParserNodeInfoSeq {
Packit 423ecb
    unsigned long	maximum
Packit 423ecb
    unsigned long	length
Packit 423ecb
    xmlParserNodeInfo *	buffer
Packit 423ecb
} xmlParserNodeInfoSeq;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef xmlParserNodeInfoSeqPtr

xmlParserNodeInfoSeq * xmlParserNodeInfoSeqPtr;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Enum xmlParserOption

enum xmlParserOption {
Packit 423ecb
    XML_PARSE_RECOVER = 1 /* recover on errors */
Packit 423ecb
    XML_PARSE_NOENT = 2 /* substitute entities */
Packit 423ecb
    XML_PARSE_DTDLOAD = 4 /* load the external subset */
Packit 423ecb
    XML_PARSE_DTDATTR = 8 /* default DTD attributes */
Packit 423ecb
    XML_PARSE_DTDVALID = 16 /* validate with the DTD */
Packit 423ecb
    XML_PARSE_NOERROR = 32 /* suppress error reports */
Packit 423ecb
    XML_PARSE_NOWARNING = 64 /* suppress warning reports */
Packit 423ecb
    XML_PARSE_PEDANTIC = 128 /* pedantic error reporting */
Packit 423ecb
    XML_PARSE_NOBLANKS = 256 /* remove blank nodes */
Packit 423ecb
    XML_PARSE_SAX1 = 512 /* use the SAX1 interface internally */
Packit 423ecb
    XML_PARSE_XINCLUDE = 1024 /* Implement XInclude substitition */
Packit 423ecb
    XML_PARSE_NONET = 2048 /* Forbid network access */
Packit 423ecb
    XML_PARSE_NODICT = 4096 /* Do not reuse the context dictionary */
Packit 423ecb
    XML_PARSE_NSCLEAN = 8192 /* remove redundant namespaces declarations */
Packit 423ecb
    XML_PARSE_NOCDATA = 16384 /* merge CDATA as text nodes */
Packit 423ecb
    XML_PARSE_NOXINCNODE = 32768 /* do not generate XINCLUDE START/END nodes */
Packit 423ecb
    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) */
Packit 423ecb
    XML_PARSE_OLD10 = 131072 /* parse using XML-1.0 before update 5 */
Packit 423ecb
    XML_PARSE_NOBASEFIX = 262144 /* do not fixup XINCLUDE xml:base uris */
Packit 423ecb
    XML_PARSE_HUGE = 524288 /* relax any hardcoded limit from the parser */
Packit 423ecb
    XML_PARSE_OLDSAX = 1048576 /* parse using SAX2 interface before 2.7.0 */
Packit 423ecb
    XML_PARSE_IGNORE_ENC = 2097152 /* ignore internal document encoding hint */
Packit 423ecb
    XML_PARSE_BIG_LINES = 4194304 /*  Store big lines numbers in text PSVI field */
Packit 423ecb
};
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Structure xmlSAXHandlerV1

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

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef xmlSAXHandlerV1Ptr

xmlSAXHandlerV1 * xmlSAXHandlerV1Ptr;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

An attribute definition has been parsed.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>elem</tt>:the name of the element
<tt>fullname</tt>:the attribute name
<tt>type</tt>:the attribute type
<tt>def</tt>:the type of default value
<tt>defaultValue</tt>:the attribute default value
<tt>tree</tt>:the tree of enumerated value set
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>name</tt>:The attribute name, including namespace prefix
<tt>value</tt>:The attribute value
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Called when a pcdata block has been parsed.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>value</tt>:The pcdata content
<tt>len</tt>:the block length
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Receiving some chars from the parser.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>ch</tt>:a xmlChar string
<tt>len</tt>:the number of xmlChar
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

A comment has been parsed.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>value</tt>:the comment content
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

An element definition has been parsed.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>name</tt>:the element name
<tt>type</tt>:the element type
<tt>content</tt>:the element value tree
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Called when the document end has been detected.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>localname</tt>:the local name of the element
<tt>prefix</tt>:the element namespace prefix if available
<tt>URI</tt>:the element namespace name if available
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Called when the end of an element has been detected.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>name</tt>:The element name
Packit 423ecb
        
Packit 423ecb
        

Function type entityDeclSAXFunc

void	entityDeclSAXFunc		(void * ctx, 
const
xmlChar * name,
int type,
const xmlChar * publicId,
const xmlChar * systemId,
xmlChar * content)
Packit 423ecb

An entity definition has been parsed.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>name</tt>:the entity name
<tt>type</tt>:the entity type
<tt>publicId</tt>:The public ID of the entity
<tt>systemId</tt>:The system ID of the entity
<tt>content</tt>:the entity value (without processing).
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Display and format an error messages, callback.

Packit 423ecb
<tt>ctx</tt>:an XML parser context
<tt>msg</tt>:the message to display/transmit
<tt>...</tt>:extra parameters for the message display
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Callback on external subset declaration.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>name</tt>:the root element name
<tt>ExternalID</tt>:the external ID
<tt>SystemID</tt>:the SYSTEM ID (e.g. filename or URL)
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctx</tt>:an XML parser context
<tt>msg</tt>:the message to display/transmit
<tt>...</tt>:extra parameters for the message display
Packit 423ecb
        
Packit 423ecb
        

Function type getEntitySAXFunc

xmlEntityPtr	getEntitySAXFunc	(void * ctx, 
const xmlChar * name)
Packit 423ecb

Get an entity by name.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>name</tt>:The entity name
<tt>Returns</tt>:the xmlEntityPtr if found.
Packit 423ecb
        
Packit 423ecb
        

Function type getParameterEntitySAXFunc

xmlEntityPtr	getParameterEntitySAXFunc	(void * ctx, 
const xmlChar * name)
Packit 423ecb

Get a parameter entity by name.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>name</tt>:The entity name
<tt>Returns</tt>:the xmlEntityPtr if found.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Does this document has an external subset?

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>Returns</tt>:1 if true
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Does this document has an internal subset.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>Returns</tt>:1 if true
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>ch</tt>:a xmlChar string
<tt>len</tt>:the number of xmlChar
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Callback on internal subset declaration.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>name</tt>:the root element name
<tt>ExternalID</tt>:the external ID
<tt>SystemID</tt>:the SYSTEM ID (e.g. filename or URL)
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Is this document tagged standalone?

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>Returns</tt>:1 if true
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

What to do when a notation declaration has been parsed.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>name</tt>:The name of the notation
<tt>publicId</tt>:The public ID of the entity
<tt>systemId</tt>:The system ID of the entity
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

A processing instruction has been parsed.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>target</tt>:the target name
<tt>data</tt>:the PI data's
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Called when an entity reference is detected.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>name</tt>:The entity name
Packit 423ecb
        
Packit 423ecb
        

Function type resolveEntitySAXFunc

xmlParserInputPtr	resolveEntitySAXFunc	(void * ctx, 
const xmlChar * publicId,
const xmlChar * systemId)
Packit 423ecb

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

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>publicId</tt>:The public ID of the entity
<tt>systemId</tt>:The system ID of the entity
<tt>Returns</tt>:the xmlParserInputPtr if inlined or NULL for DOM behaviour.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>loc</tt>:A SAX Locator
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Called when the document start being processed.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
Packit 423ecb
        
Packit 423ecb
        

Function type startElementNsSAX2Func

void	startElementNsSAX2Func		(void * ctx, 
const
xmlChar * localname,
const xmlChar * prefix,
const xmlChar * URI,
int nb_namespaces,
const xmlChar ** namespaces,
int nb_attributes,
int nb_defaulted,
const xmlChar ** attributes)
Packit 423ecb

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.

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

Called when an opening tag has been processed.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>name</tt>:The element name, including namespace prefix
<tt>atts</tt>:An array of name/value attributes pairs, NULL terminated
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

What to do when an unparsed entity declaration is parsed.

Packit 423ecb
<tt>ctx</tt>:the user data (XML parser context)
<tt>name</tt>:The name of the entity
<tt>publicId</tt>:The public ID of the entity
<tt>systemId</tt>:The system ID of the entity
<tt>notationName</tt>:the name of the notation
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Display and format a warning messages, callback.

Packit 423ecb
<tt>ctx</tt>:an XML parser context
<tt>msg</tt>:the message to display/transmit
<tt>...</tt>:extra parameters for the message display
Packit 423ecb
        
Packit 423ecb
        

Function type xmlExternalEntityLoader

xmlParserInputPtr	xmlExternalEntityLoader	(const char * URL, 
const char * ID,
xmlParserCtxtPtr context)
Packit 423ecb

External entity loaders types.

Packit 423ecb
<tt>URL</tt>:The System ID of the resource requested
<tt>ID</tt>:The Public ID of the resource requested
<tt>context</tt>:the XML parser context
<tt>Returns</tt>:the entity input parser.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Callback for freeing some parser input allocations.

Packit 423ecb
<tt>str</tt>:the string to deallocate
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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.

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
<tt>Returns</tt>:the index in bytes from the beginning of the entity or -1 in case the index could not be computed.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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 !

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>seq</tt>:a node info sequence pointer
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Clear (release owned resources) and reinitialize a parser context

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
Packit 423ecb
        
Packit 423ecb
        

xmlCreateDocParserCtxt ()

xmlParserCtxtPtr	xmlCreateDocParserCtxt	(const xmlChar * cur)
Packit 423ecb

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

Packit 423ecb
<tt>cur</tt>:a pointer to an array of xmlChar
<tt>Returns</tt>:the new parser context or NULL
Packit 423ecb
        
Packit 423ecb
        

xmlCreateIOParserCtxt ()

xmlParserCtxtPtr	xmlCreateIOParserCtxt	(xmlSAXHandlerPtr sax, 
void * user_data,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void * ioctx,
xmlCharEncoding enc)
Packit 423ecb

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

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

xmlCreatePushParserCtxt ()

xmlParserCtxtPtr	xmlCreatePushParserCtxt	(xmlSAXHandlerPtr sax, 
void * user_data,
const char * chunk,
int size,
const char * filename)
Packit 423ecb

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.

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

xmlCtxtReadDoc ()

xmlDocPtr	xmlCtxtReadDoc		(xmlParserCtxtPtr ctxt, 
const xmlChar * cur,
const char * URL,
const char * encoding,
int options)
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
<tt>cur</tt>:a pointer to a zero terminated string
<tt>URL</tt>:the base URL to use for the document
<tt>encoding</tt>:the document encoding, or NULL
<tt>options</tt>:a combination of xmlParserOption
<tt>Returns</tt>:the resulting document tree
Packit 423ecb
        
Packit 423ecb
        

xmlCtxtReadFd ()

xmlDocPtr	xmlCtxtReadFd		(xmlParserCtxtPtr ctxt, 
int fd,
const char * URL,
const char * encoding,
int options)
Packit 423ecb

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.

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
<tt>fd</tt>:an open file descriptor
<tt>URL</tt>:the base URL to use for the document
<tt>encoding</tt>:the document encoding, or NULL
<tt>options</tt>:a combination of xmlParserOption
<tt>Returns</tt>:the resulting document tree
Packit 423ecb
        
Packit 423ecb
        

xmlCtxtReadFile ()

xmlDocPtr	xmlCtxtReadFile		(xmlParserCtxtPtr ctxt, 
const char * filename,
const char * encoding,
int options)
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
<tt>filename</tt>:a file or URL
<tt>encoding</tt>:the document encoding, or NULL
<tt>options</tt>:a combination of xmlParserOption
<tt>Returns</tt>:the resulting document tree
Packit 423ecb
        
Packit 423ecb
        

xmlCtxtReadIO ()

xmlDocPtr	xmlCtxtReadIO		(xmlParserCtxtPtr ctxt, 
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options)
Packit 423ecb

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

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

xmlCtxtReadMemory ()

xmlDocPtr	xmlCtxtReadMemory	(xmlParserCtxtPtr ctxt, 
const char * buffer,
int size,
const char * URL,
const char * encoding,
int options)
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
<tt>buffer</tt>:a pointer to a char array
<tt>size</tt>:the size of the array
<tt>URL</tt>:the base URL to use for the document
<tt>encoding</tt>:the document encoding, or NULL
<tt>options</tt>:a combination of xmlParserOption
<tt>Returns</tt>:the resulting document tree
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Reset a parser context

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
Packit 423ecb
        
Packit 423ecb
        

xmlCtxtResetPush ()

int	xmlCtxtResetPush		(xmlParserCtxtPtr ctxt, 
const char * chunk,
int size,
const char * filename,
const char * encoding)
Packit 423ecb

Reset a push parser context

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

Applies the options to the parser context

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
<tt>options</tt>:a combination of xmlParserOption
<tt>Returns</tt>:0 in case of success, the set of unknown or unimplemented options in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Get the default external entity resolver function for the application

Packit 423ecb
<tt>Returns</tt>:the xmlExternalEntityLoader function pointer
Packit 423ecb
        
Packit 423ecb
        

xmlGetFeature ()

int	xmlGetFeature			(xmlParserCtxtPtr ctxt, 
const char * name,
void * result)
Packit 423ecb

Read the current value of one feature of this parser instance

Packit 423ecb
<tt>ctxt</tt>:an XML/HTML parser context
<tt>name</tt>:the feature name
<tt>result</tt>:location to store the result
<tt>Returns</tt>:-1 in case or error, 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>len</tt>:the length of the features name array (input/output)
<tt>result</tt>:an array of string to be filled with the features name.
<tt>Returns</tt>:-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
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>feature</tt>:the feature to be examined
<tt>Returns</tt>: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.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Load and parse a DTD

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

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

Packit 423ecb
<tt>seq</tt>:a node info sequence pointer
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Initialize a parser context

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
<tt>Returns</tt>:0 in case of success and -1 in case of error
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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.

Packit 423ecb
<tt>val</tt>:int 0 or 1
<tt>Returns</tt>:the last value for 0 for no substitution, 1 for substitution.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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.

Packit 423ecb
<tt>val</tt>:int 0 or 1
<tt>Returns</tt>:the last value for 0 for no substitution, 1 for substitution.
Packit 423ecb
        
Packit 423ecb
        

xmlLoadExternalEntity ()

xmlParserInputPtr	xmlLoadExternalEntity	(const char * URL, 
const char * ID,
xmlParserCtxtPtr ctxt)
Packit 423ecb

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

Packit 423ecb
<tt>URL</tt>:the URL for the entity to load
<tt>ID</tt>:the Public ID for the entity to load
<tt>ctxt</tt>:the context in which the entity is called or NULL
<tt>Returns</tt>:the xmlParserInputPtr or NULL
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
<tt>input</tt>:an I/O Input
<tt>enc</tt>:the charset encoding if known
<tt>Returns</tt>:the new input stream or NULL
Packit 423ecb
        
Packit 423ecb
        

xmlNewParserCtxt ()

xmlParserCtxtPtr	xmlNewParserCtxt	(void)
Packit 423ecb

Allocate and initialize a new parser context.

Packit 423ecb
<tt>Returns</tt>:the xmlParserCtxtPtr or NULL
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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)*

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

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)*

Packit 423ecb
<tt>doc</tt>:the document the chunk pertains to
<tt>sax</tt>:the SAX handler bloc (possibly NULL)
<tt>user_data</tt>:The user data returned on SAX callbacks (possibly NULL)
<tt>depth</tt>:Used for loop detection, use 0
<tt>string</tt>:the input string in UTF8 or ISO-Latin (zero terminated)
<tt>lst</tt>:the return value for the set of parsed nodes
<tt>recover</tt>:return nodes even if the data is broken (use 0)
<tt>Returns</tt>: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.
Packit 423ecb
        
Packit 423ecb
        

xmlParseChunk ()

int	xmlParseChunk			(xmlParserCtxtPtr ctxt, 
const char * chunk,
int size,
int terminate)
Packit 423ecb

Parse a Chunk of memory

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
<tt>chunk</tt>:an char array
<tt>size</tt>:the size in byte of the chunk
<tt>terminate</tt>:last chunk indicator
<tt>Returns</tt>:zero if no error, the xmlParserErrors otherwise.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

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

xmlParseDTD ()

xmlDtdPtr	xmlParseDTD		(const xmlChar * ExternalID, 
const xmlChar * SystemID)
Packit 423ecb

Load and parse an external subset.

Packit 423ecb
<tt>ExternalID</tt>:a NAME* containing the External ID of the DTD
<tt>SystemID</tt>:a NAME* containing the URL to the DTD
<tt>Returns</tt>:the resulting xmlDtdPtr or NULL in case of error.
Packit 423ecb
        
Packit 423ecb
        

xmlParseDoc ()

xmlDocPtr	xmlParseDoc		(const xmlChar * cur)
Packit 423ecb

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

Packit 423ecb
<tt>cur</tt>:a pointer to an array of xmlChar
<tt>Returns</tt>:the resulting document tree
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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*)?

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
<tt>Returns</tt>:0, -1 in case of error. the parser context is augmented as a result of the parsing.
Packit 423ecb
        
Packit 423ecb
        

xmlParseEntity ()

xmlDocPtr	xmlParseEntity		(const char * filename)
Packit 423ecb

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

Packit 423ecb
<tt>filename</tt>:the filename
<tt>Returns</tt>:the resulting document tree
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
<tt>Returns</tt>:0, -1 in case of error. the parser context is augmented as a result of the parsing.
Packit 423ecb
        
Packit 423ecb
        

xmlParseExternalEntity ()

int	xmlParseExternalEntity		(xmlDocPtr doc, 
xmlSAXHandlerPtr sax,
void * user_data,
int depth,
const xmlChar * URL,
const xmlChar * ID,
xmlNodePtr * lst)
Packit 423ecb

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

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

xmlParseFile ()

xmlDocPtr	xmlParseFile		(const char * filename)
Packit 423ecb

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

Packit 423ecb
<tt>filename</tt>:the filename
<tt>Returns</tt>:the resulting document tree if the file was wellformed, NULL otherwise.
Packit 423ecb
        
Packit 423ecb
        

xmlParseInNodeContext ()

xmlParserErrors	xmlParseInNodeContext	(xmlNodePtr node, 
const char * data,
int datalen,
int options,
xmlNodePtr * lst)
Packit 423ecb

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)*

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

xmlParseMemory ()

xmlDocPtr	xmlParseMemory		(const char * buffer, 
int size)
Packit 423ecb

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

Packit 423ecb
<tt>buffer</tt>:an pointer to a char array
<tt>size</tt>:the size of the array
<tt>Returns</tt>:the resulting document tree
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Insert node info record into the sorted sequence

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
<tt>info</tt>:a node info sequence pointer
Packit 423ecb
        
Packit 423ecb
        

xmlParserFindNodeInfo ()

const xmlParserNodeInfo *	xmlParserFindNodeInfo	(const xmlParserCtxtPtr ctx, 
const xmlNodePtr node)
Packit 423ecb

Find the parser node info struct for a given node

Packit 423ecb
<tt>ctx</tt>:an XML parser context
<tt>node</tt>:an XML node within the tree
<tt>Returns</tt>:an xmlParserNodeInfo block pointer or NULL
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>seq</tt>:a node info sequence pointer
<tt>node</tt>:an XML node pointer
<tt>Returns</tt>:a long indicating the position of the record
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>in</tt>:an XML parser input
<tt>len</tt>:an indicative size for the lookahead
<tt>Returns</tt>:the amount of char read, or -1 in case of error, 0 indicate the end of this entity
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

This function was internal and is deprecated.

Packit 423ecb
<tt>in</tt>:an XML parser input
<tt>len</tt>:an indicative size for the lookahead
<tt>Returns</tt>:-1 as this is an error to use it.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Set and return the previous value for enabling pedantic warnings.

Packit 423ecb
<tt>val</tt>:int 0 or 1
<tt>Returns</tt>:the last value for 0 for no substitution, 1 for substitution.
Packit 423ecb
        
Packit 423ecb
        

xmlReadDoc ()

xmlDocPtr	xmlReadDoc		(const xmlChar * cur, 
const char * URL,
const char * encoding,
int options)
Packit 423ecb

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

Packit 423ecb
<tt>cur</tt>:a pointer to a zero terminated string
<tt>URL</tt>:the base URL to use for the document
<tt>encoding</tt>:the document encoding, or NULL
<tt>options</tt>:a combination of xmlParserOption
<tt>Returns</tt>:the resulting document tree
Packit 423ecb
        
Packit 423ecb
        

xmlReadFd ()

xmlDocPtr	xmlReadFd		(int fd, 
const char * URL,
const char * encoding,
int options)
Packit 423ecb

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.

Packit 423ecb
<tt>fd</tt>:an open file descriptor
<tt>URL</tt>:the base URL to use for the document
<tt>encoding</tt>:the document encoding, or NULL
<tt>options</tt>:a combination of xmlParserOption
<tt>Returns</tt>:the resulting document tree
Packit 423ecb
        
Packit 423ecb
        

xmlReadFile ()

xmlDocPtr	xmlReadFile		(const char * filename, 
const char * encoding,
int options)
Packit 423ecb

parse an XML file from the filesystem or the network.

Packit 423ecb
<tt>filename</tt>:a file or URL
<tt>encoding</tt>:the document encoding, or NULL
<tt>options</tt>:a combination of xmlParserOption
<tt>Returns</tt>:the resulting document tree
Packit 423ecb
        
Packit 423ecb
        

xmlReadIO ()

xmlDocPtr	xmlReadIO		(xmlInputReadCallback ioread, 
xmlInputCloseCallback ioclose,
void * ioctx,
const char * URL,
const char * encoding,
int options)
Packit 423ecb

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

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

xmlReadMemory ()

xmlDocPtr	xmlReadMemory		(const char * buffer, 
int size,
const char * URL,
const char * encoding,
int options)
Packit 423ecb

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

Packit 423ecb
<tt>buffer</tt>:a pointer to a char array
<tt>size</tt>:the size of the array
<tt>URL</tt>:the base URL to use for the document
<tt>encoding</tt>:the document encoding, or NULL
<tt>options</tt>:a combination of xmlParserOption
<tt>Returns</tt>:the resulting document tree
Packit 423ecb
        
Packit 423ecb
        

xmlRecoverDoc ()

xmlDocPtr	xmlRecoverDoc		(const xmlChar * cur)
Packit 423ecb

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

Packit 423ecb
<tt>cur</tt>:a pointer to an array of xmlChar
<tt>Returns</tt>:the resulting document tree or NULL in case of failure
Packit 423ecb
        
Packit 423ecb
        

xmlRecoverFile ()

xmlDocPtr	xmlRecoverFile		(const char * filename)
Packit 423ecb

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

Packit 423ecb
<tt>filename</tt>:the filename
<tt>Returns</tt>:the resulting document tree or NULL in case of failure
Packit 423ecb
        
Packit 423ecb
        

xmlRecoverMemory ()

xmlDocPtr	xmlRecoverMemory	(const char * buffer, 
int size)
Packit 423ecb

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

Packit 423ecb
<tt>buffer</tt>:an pointer to a char array
<tt>size</tt>:the size of the array
<tt>Returns</tt>:the resulting document tree or NULL in case of error
Packit 423ecb
        
Packit 423ecb
        

xmlSAXParseDTD ()

xmlDtdPtr	xmlSAXParseDTD		(xmlSAXHandlerPtr sax, 
const xmlChar * ExternalID,
const xmlChar * SystemID)
Packit 423ecb

Load and parse an external subset.

Packit 423ecb
<tt>sax</tt>:the SAX handler block
<tt>ExternalID</tt>:a NAME* containing the External ID of the DTD
<tt>SystemID</tt>:a NAME* containing the URL to the DTD
<tt>Returns</tt>:the resulting xmlDtdPtr or NULL in case of error.
Packit 423ecb
        
Packit 423ecb
        

xmlSAXParseDoc ()

xmlDocPtr	xmlSAXParseDoc		(xmlSAXHandlerPtr sax, 
const xmlChar * cur,
int recovery)
Packit 423ecb

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.

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

xmlSAXParseEntity ()

xmlDocPtr	xmlSAXParseEntity	(xmlSAXHandlerPtr sax, 
const char * filename)
Packit 423ecb

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

Packit 423ecb
<tt>sax</tt>:the SAX handler block
<tt>filename</tt>:the filename
<tt>Returns</tt>:the resulting document tree
Packit 423ecb
        
Packit 423ecb
        

xmlSAXParseFile ()

xmlDocPtr	xmlSAXParseFile		(xmlSAXHandlerPtr sax, 
const char * filename,
int recovery)
Packit 423ecb

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.

Packit 423ecb
<tt>sax</tt>:the SAX handler block
<tt>filename</tt>:the filename
<tt>recovery</tt>:work in recovery mode, i.e. tries to read no Well Formed documents
<tt>Returns</tt>:the resulting document tree
Packit 423ecb
        
Packit 423ecb
        

xmlSAXParseFileWithData ()

xmlDocPtr	xmlSAXParseFileWithData	(xmlSAXHandlerPtr sax, 
const char * filename,
int recovery,
void * data)
Packit 423ecb

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

Packit 423ecb
<tt>sax</tt>:the SAX handler block
<tt>filename</tt>:the filename
<tt>recovery</tt>:work in recovery mode, i.e. tries to read no Well Formed documents
<tt>data</tt>:the userdata
<tt>Returns</tt>:the resulting document tree
Packit 423ecb
        
Packit 423ecb
        

xmlSAXParseMemory ()

xmlDocPtr	xmlSAXParseMemory	(xmlSAXHandlerPtr sax, 
const char * buffer,
int size,
int recovery)
Packit 423ecb

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.

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

xmlSAXParseMemoryWithData ()

xmlDocPtr	xmlSAXParseMemoryWithData	(xmlSAXHandlerPtr sax, 
const char * buffer,
int size,
int recovery,
void * data)
Packit 423ecb

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

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

xmlSAXUserParseFile ()

int	xmlSAXUserParseFile		(xmlSAXHandlerPtr sax, 
void * user_data,
const char * filename)
Packit 423ecb

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

Packit 423ecb
<tt>sax</tt>:a SAX handler
<tt>user_data</tt>:The user data returned on SAX callbacks
<tt>filename</tt>:a file name
<tt>Returns</tt>:0 in case of success or a error number otherwise
Packit 423ecb
        
Packit 423ecb
        

xmlSAXUserParseMemory ()

int	xmlSAXUserParseMemory		(xmlSAXHandlerPtr sax, 
void * user_data,
const char * buffer,
int size)
Packit 423ecb

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

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

Changes the defaultexternal entity resolver function for the application

Packit 423ecb
<tt>f</tt>:the new entity resolver function
Packit 423ecb
        
Packit 423ecb
        

xmlSetFeature ()

int	xmlSetFeature			(xmlParserCtxtPtr ctxt, 
const char * name,
void * value)
Packit 423ecb

Change the current value of one feature of this parser instance

Packit 423ecb
<tt>ctxt</tt>:an XML/HTML parser context
<tt>name</tt>:the feature name
<tt>value</tt>:pointer to the location of the new value
<tt>Returns</tt>:-1 in case or error, 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
<tt>buffer</tt>:a xmlChar * buffer
<tt>filename</tt>:a file name
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Blocks further parser processing

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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.

Packit 423ecb
<tt>val</tt>:int 0 or 1
<tt>Returns</tt>:the last value for 0 for no substitution, 1 for substitution.
Packit 423ecb
        
Packit 423ecb
      
Packit 423ecb
    
Packit 423ecb
  </body>
Packit 423ecb
</html>