ReactOS  0.4.15-dev-3316-g067ca88
parser.h
Go to the documentation of this file.
1 /*
2  * Summary: the core parser module
3  * Description: Interfaces, constants and types related to the XML parser
4  *
5  * Copy: See Copyright for the status of this software.
6  *
7  * Author: Daniel Veillard
8  */
9 
10 #ifndef __XML_PARSER_H__
11 #define __XML_PARSER_H__
12 
13 #include <stdarg.h>
14 
15 #include <libxml/xmlversion.h>
16 #include <libxml/tree.h>
17 #include <libxml/dict.h>
18 #include <libxml/hash.h>
19 #include <libxml/valid.h>
20 #include <libxml/entities.h>
21 #include <libxml/xmlerror.h>
22 #include <libxml/xmlstring.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
33 #define XML_DEFAULT_VERSION "1.0"
34 
53 
55  /* Input buffer */
56  xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */
57 
58  const char *filename; /* The file analyzed, if any */
59  const char *directory; /* the directory/base of the file */
60  const xmlChar *base; /* Base of the array to parse */
61  const xmlChar *cur; /* Current char being parsed */
62  const xmlChar *end; /* end of the array to parse */
63  int length; /* length if known */
64  int line; /* Current line */
65  int col; /* Current column */
66  /*
67  * NOTE: consumed is only tested for equality in the parser code,
68  * so even if there is an overflow this should not give troubles
69  * for parsing very large instances.
70  */
71  unsigned long consumed; /* How many xmlChars already consumed */
72  xmlParserInputDeallocate free; /* function to deallocate the base */
73  const xmlChar *encoding; /* the encoding string for entity */
74  const xmlChar *version; /* the version string for entity */
75  int standalone; /* Was that entity marked standalone */
76  int id; /* an unique identifier for the entity */
77 };
78 
88 
90  const struct _xmlNode* node;
91  /* Position & line # that text that created the node begins & ends on */
92  unsigned long begin_pos;
93  unsigned long begin_line;
94  unsigned long end_pos;
95  unsigned long end_line;
96 };
97 
101  unsigned long maximum;
102  unsigned long length;
104 };
105 
112 typedef enum {
113  XML_PARSER_EOF = -1, /* nothing is to be parsed */
114  XML_PARSER_START = 0, /* nothing has been parsed */
115  XML_PARSER_MISC, /* Misc* before int subset */
116  XML_PARSER_PI, /* Within a processing instruction */
117  XML_PARSER_DTD, /* within some DTD content */
118  XML_PARSER_PROLOG, /* Misc* after internal subset */
119  XML_PARSER_COMMENT, /* within a comment */
120  XML_PARSER_START_TAG, /* within a start tag */
121  XML_PARSER_CONTENT, /* within the content */
122  XML_PARSER_CDATA_SECTION, /* within a CDATA section */
123  XML_PARSER_END_TAG, /* within a closing tag */
124  XML_PARSER_ENTITY_DECL, /* within an entity declaration */
125  XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */
126  XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */
127  XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */
128  XML_PARSER_EPILOG, /* the Misc* after the last end tag */
129  XML_PARSER_IGNORE, /* within an IGNORED section */
130  XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */
132 
139 #define XML_DETECT_IDS 2
140 
148 #define XML_COMPLETE_ATTRS 4
149 
156 #define XML_SKIP_IDS 8
157 
163 typedef enum {
170 } xmlParserMode;
171 
172 typedef struct _xmlStartTag xmlStartTag;
173 
187  struct _xmlSAXHandler *sax; /* The SAX handler */
188  void *userData; /* For SAX interface only, used by DOM build */
189  xmlDocPtr myDoc; /* the document being built */
190  int wellFormed; /* is the document well formed */
191  int replaceEntities; /* shall we replace entities ? */
192  const xmlChar *version; /* the XML version string */
193  const xmlChar *encoding; /* the declared encoding, if any */
194  int standalone; /* standalone document */
195  int html; /* an HTML(1)/Docbook(2) document
196  * 3 is HTML after <head>
197  * 10 is HTML after <body>
198  */
199 
200  /* Input stream stack */
201  xmlParserInputPtr input; /* Current input stream */
202  int inputNr; /* Number of current input streams */
203  int inputMax; /* Max number of input streams */
204  xmlParserInputPtr *inputTab; /* stack of inputs */
205 
206  /* Node analysis stack only used for DOM building */
207  xmlNodePtr node; /* Current parsed Node */
208  int nodeNr; /* Depth of the parsing stack */
209  int nodeMax; /* Max depth of the parsing stack */
210  xmlNodePtr *nodeTab; /* array of nodes */
211 
212  int record_info; /* Whether node info should be kept */
213  xmlParserNodeInfoSeq node_seq; /* info about each node parsed */
214 
215  int errNo; /* error code */
216 
217  int hasExternalSubset; /* reference and external subset */
218  int hasPErefs; /* the internal subset has PE refs */
219  int external; /* are we parsing an external entity */
220 
221  int valid; /* is the document valid */
222  int validate; /* shall we try to validate ? */
223  xmlValidCtxt vctxt; /* The validity context */
224 
225  xmlParserInputState instate; /* current type of input */
226  int token; /* next char look-ahead */
227 
228  char *directory; /* the data directory */
229 
230  /* Node name stack */
231  const xmlChar *name; /* Current parsed Node */
232  int nameNr; /* Depth of the parsing stack */
233  int nameMax; /* Max depth of the parsing stack */
234  const xmlChar * *nameTab; /* array of nodes */
235 
236  long nbChars; /* unused */
237  long checkIndex; /* used by progressive parsing lookup */
238  int keepBlanks; /* ugly but ... */
239  int disableSAX; /* SAX callbacks are disabled */
240  int inSubset; /* Parsing is in int 1/ext 2 subset */
241  const xmlChar * intSubName; /* name of subset */
242  xmlChar * extSubURI; /* URI of external subset */
243  xmlChar * extSubSystem; /* SYSTEM ID of external subset */
244 
245  /* xml:space values */
246  int * space; /* Should the parser preserve spaces */
247  int spaceNr; /* Depth of the parsing stack */
248  int spaceMax; /* Max depth of the parsing stack */
249  int * spaceTab; /* array of space infos */
250 
251  int depth; /* to prevent entity substitution loops */
252  xmlParserInputPtr entity; /* used to check entities boundaries */
253  int charset; /* encoding of the in-memory content
254  actually an xmlCharEncoding */
255  int nodelen; /* Those two fields are there to */
256  int nodemem; /* Speed up large node parsing */
257  int pedantic; /* signal pedantic warnings */
258  void *_private; /* For user data, libxml won't touch it */
259 
260  int loadsubset; /* should the external subset be loaded */
261  int linenumbers; /* set line number in element content */
262  void *catalogs; /* document's own catalog */
263  int recovery; /* run in recovery mode */
264  int progressive; /* is this a progressive parsing */
265  xmlDictPtr dict; /* dictionary for the parser */
266  const xmlChar * *atts; /* array for the attributes callbacks */
267  int maxatts; /* the size of the array */
268  int docdict; /* use strings from dict to build tree */
269 
270  /*
271  * pre-interned strings
272  */
273  const xmlChar *str_xml;
276 
277  /*
278  * Everything below is used only by the new SAX mode
279  */
280  int sax2; /* operating in the new SAX mode */
281  int nsNr; /* the number of inherited namespaces */
282  int nsMax; /* the size of the arrays */
283  const xmlChar * *nsTab; /* the array of prefix/namespace name */
284  int *attallocs; /* which attribute were allocated */
285  xmlStartTag *pushTab; /* array of data for push */
286  xmlHashTablePtr attsDefault; /* defaulted attributes if any */
287  xmlHashTablePtr attsSpecial; /* non-CDATA attributes if any */
288  int nsWellFormed; /* is the document XML Namespace okay */
289  int options; /* Extra options */
290 
291  /*
292  * Those fields are needed only for streaming parsing so far
293  */
294  int dictNames; /* Use dictionary names for the tree */
295  int freeElemsNr; /* number of freed element nodes */
296  xmlNodePtr freeElems; /* List of freed element nodes */
297  int freeAttrsNr; /* number of freed attributes nodes */
298  xmlAttrPtr freeAttrs; /* List of freed attributes nodes */
299 
300  /*
301  * the complete error information for the last error.
302  */
304  xmlParserMode parseMode; /* the parser mode */
305  unsigned long nbentities; /* number of entities references */
306  unsigned long sizeentities; /* size of parsed entities */
307 
308  /* for use by HTML non-recursive parser */
309  xmlParserNodeInfo *nodeInfo; /* Current NodeInfo */
310  int nodeInfoNr; /* Depth of the parsing stack */
311  int nodeInfoMax; /* Max depth of the parsing stack */
312  xmlParserNodeInfo *nodeInfoTab; /* array of nodeInfos */
313 
314  int input_id; /* we need to label inputs */
315  unsigned long sizeentcopy; /* volume of entity copy */
316 };
317 
324  const xmlChar *(*getPublicId)(void *ctx);
325  const xmlChar *(*getSystemId)(void *ctx);
326  int (*getLineNumber)(void *ctx);
328 };
329 
353  const xmlChar *publicId,
354  const xmlChar *systemId);
364 typedef void (*internalSubsetSAXFunc) (void *ctx,
365  const xmlChar *name,
366  const xmlChar *ExternalID,
367  const xmlChar *SystemID);
377 typedef void (*externalSubsetSAXFunc) (void *ctx,
378  const xmlChar *name,
379  const xmlChar *ExternalID,
380  const xmlChar *SystemID);
391  const xmlChar *name);
402  const xmlChar *name);
414 typedef void (*entityDeclSAXFunc) (void *ctx,
415  const xmlChar *name,
416  int type,
417  const xmlChar *publicId,
418  const xmlChar *systemId,
419  xmlChar *content);
429 typedef void (*notationDeclSAXFunc)(void *ctx,
430  const xmlChar *name,
431  const xmlChar *publicId,
432  const xmlChar *systemId);
445 typedef void (*attributeDeclSAXFunc)(void *ctx,
446  const xmlChar *elem,
447  const xmlChar *fullname,
448  int type,
449  int def,
450  const xmlChar *defaultValue,
461 typedef void (*elementDeclSAXFunc)(void *ctx,
462  const xmlChar *name,
463  int type,
476  const xmlChar *name,
477  const xmlChar *publicId,
478  const xmlChar *systemId,
479  const xmlChar *notationName);
489  xmlSAXLocatorPtr loc);
496 typedef void (*startDocumentSAXFunc) (void *ctx);
503 typedef void (*endDocumentSAXFunc) (void *ctx);
512 typedef void (*startElementSAXFunc) (void *ctx,
513  const xmlChar *name,
514  const xmlChar **atts);
522 typedef void (*endElementSAXFunc) (void *ctx,
523  const xmlChar *name);
535 typedef void (*attributeSAXFunc) (void *ctx,
536  const xmlChar *name,
537  const xmlChar *value);
545 typedef void (*referenceSAXFunc) (void *ctx,
546  const xmlChar *name);
555 typedef void (*charactersSAXFunc) (void *ctx,
556  const xmlChar *ch,
557  int len);
568  const xmlChar *ch,
569  int len);
579  const xmlChar *target,
580  const xmlChar *data);
588 typedef void (*commentSAXFunc) (void *ctx,
589  const xmlChar *value);
599  void *ctx,
600  const xmlChar *value,
601  int len);
610 typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
611  const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
620 typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
621  const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
632 typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx,
633  const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
642 typedef int (*isStandaloneSAXFunc) (void *ctx);
651 typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
652 
661 typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
662 
663 /************************************************************************
664  * *
665  * The SAX version 2 API extensions *
666  * *
667  ************************************************************************/
673 #define XML_SAX2_MAGIC 0xDEEDBEAF
674 
694 typedef void (*startElementNsSAX2Func) (void *ctx,
695  const xmlChar *localname,
696  const xmlChar *prefix,
697  const xmlChar *URI,
698  int nb_namespaces,
699  const xmlChar **namespaces,
700  int nb_attributes,
701  int nb_defaulted,
702  const xmlChar **attributes);
703 
715 typedef void (*endElementNsSAX2Func) (void *ctx,
716  const xmlChar *localname,
717  const xmlChar *prefix,
718  const xmlChar *URI);
719 
720 
744  errorSAXFunc error;
745  fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
749  unsigned int initialized;
750  /* The following fields are extensions available only on version 2 */
751  void *_private;
754  xmlStructuredErrorFunc serror;
755 };
756 
757 /*
758  * SAX Version 1
759  */
785  errorSAXFunc error;
786  fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
790  unsigned int initialized;
791 };
792 
793 
804 typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
805  const char *ID,
807 
808 #ifdef __cplusplus
809 }
810 #endif
811 
812 #include <libxml/encoding.h>
813 #include <libxml/xmlIO.h>
814 #include <libxml/globals.h>
815 
816 #ifdef __cplusplus
817 extern "C" {
818 #endif
819 
820 
821 /*
822  * Init/Cleanup
823  */
824 XMLPUBFUN void XMLCALL
825  xmlInitParser (void);
826 XMLPUBFUN void XMLCALL
827  xmlCleanupParser (void);
828 
829 /*
830  * Input functions
831  */
832 XMLPUBFUN int XMLCALL
834  int len);
835 XMLPUBFUN int XMLCALL
837  int len);
838 
839 /*
840  * Basic parsing Interfaces
841  */
842 #ifdef LIBXML_SAX1_ENABLED
844  xmlParseDoc (const xmlChar *cur);
846  xmlParseFile (const char *filename);
848  xmlParseMemory (const char *buffer,
849  int size);
850 #endif /* LIBXML_SAX1_ENABLED */
851 XMLPUBFUN int XMLCALL
853 XMLPUBFUN int XMLCALL
855 XMLPUBFUN void XMLCALL
857 XMLPUBFUN int XMLCALL
859 XMLPUBFUN int XMLCALL
861 
862 #ifdef LIBXML_SAX1_ENABLED
863 /*
864  * Recovery mode
865  */
867  xmlRecoverDoc (const xmlChar *cur);
869  xmlRecoverMemory (const char *buffer,
870  int size);
872  xmlRecoverFile (const char *filename);
873 #endif /* LIBXML_SAX1_ENABLED */
874 
875 /*
876  * Less common routines and SAX interfaces
877  */
878 XMLPUBFUN int XMLCALL
880 XMLPUBFUN int XMLCALL
882 #ifdef LIBXML_SAX1_ENABLED
883 XMLPUBFUN int XMLCALL
884  xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
885  void *user_data,
886  const char *filename);
887 XMLPUBFUN int XMLCALL
888  xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
889  void *user_data,
890  const char *buffer,
891  int size);
893  xmlSAXParseDoc (xmlSAXHandlerPtr sax,
894  const xmlChar *cur,
895  int recovery);
897  xmlSAXParseMemory (xmlSAXHandlerPtr sax,
898  const char *buffer,
899  int size,
900  int recovery);
902  xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
903  const char *buffer,
904  int size,
905  int recovery,
906  void *data);
908  xmlSAXParseFile (xmlSAXHandlerPtr sax,
909  const char *filename,
910  int recovery);
912  xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
913  const char *filename,
914  int recovery,
915  void *data);
917  xmlSAXParseEntity (xmlSAXHandlerPtr sax,
918  const char *filename);
920  xmlParseEntity (const char *filename);
921 #endif /* LIBXML_SAX1_ENABLED */
922 
923 #ifdef LIBXML_VALID_ENABLED
925  xmlSAXParseDTD (xmlSAXHandlerPtr sax,
926  const xmlChar *ExternalID,
927  const xmlChar *SystemID);
929  xmlParseDTD (const xmlChar *ExternalID,
930  const xmlChar *SystemID);
932  xmlIOParseDTD (xmlSAXHandlerPtr sax,
934  xmlCharEncoding enc);
935 #endif /* LIBXML_VALID_ENABLE */
936 #ifdef LIBXML_SAX1_ENABLED
937 XMLPUBFUN int XMLCALL
938  xmlParseBalancedChunkMemory(xmlDocPtr doc,
940  void *user_data,
941  int depth,
942  const xmlChar *string,
943  xmlNodePtr *lst);
944 #endif /* LIBXML_SAX1_ENABLED */
947  const char *data,
948  int datalen,
949  int options,
950  xmlNodePtr *lst);
951 #ifdef LIBXML_SAX1_ENABLED
952 XMLPUBFUN int XMLCALL
953  xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
955  void *user_data,
956  int depth,
957  const xmlChar *string,
958  xmlNodePtr *lst,
959  int recover);
960 XMLPUBFUN int XMLCALL
961  xmlParseExternalEntity (xmlDocPtr doc,
963  void *user_data,
964  int depth,
965  const xmlChar *URL,
966  const xmlChar *ID,
967  xmlNodePtr *lst);
968 #endif /* LIBXML_SAX1_ENABLED */
969 XMLPUBFUN int XMLCALL
971  const xmlChar *URL,
972  const xmlChar *ID,
973  xmlNodePtr *lst);
974 
975 /*
976  * Parser contexts handling.
977  */
979  xmlNewParserCtxt (void);
980 XMLPUBFUN int XMLCALL
982 XMLPUBFUN void XMLCALL
984 XMLPUBFUN void XMLCALL
986 #ifdef LIBXML_SAX1_ENABLED
987 XMLPUBFUN void XMLCALL
988  xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
989  const xmlChar* buffer,
990  const char *filename);
991 #endif /* LIBXML_SAX1_ENABLED */
994 
995 #ifdef LIBXML_LEGACY_ENABLED
996 /*
997  * Reading/setting optional parsing features.
998  */
999 XMLPUBFUN int XMLCALL
1000  xmlGetFeaturesList (int *len,
1001  const char **result);
1002 XMLPUBFUN int XMLCALL
1003  xmlGetFeature (xmlParserCtxtPtr ctxt,
1004  const char *name,
1005  void *result);
1006 XMLPUBFUN int XMLCALL
1007  xmlSetFeature (xmlParserCtxtPtr ctxt,
1008  const char *name,
1009  void *value);
1010 #endif /* LIBXML_LEGACY_ENABLED */
1011 
1012 #ifdef LIBXML_PUSH_ENABLED
1013 /*
1014  * Interfaces for the Push mode.
1015  */
1017  xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
1018  void *user_data,
1019  const char *chunk,
1020  int size,
1021  const char *filename);
1022 XMLPUBFUN int XMLCALL
1023  xmlParseChunk (xmlParserCtxtPtr ctxt,
1024  const char *chunk,
1025  int size,
1026  int terminate);
1027 #endif /* LIBXML_PUSH_ENABLED */
1028 
1029 /*
1030  * Special I/O mode.
1031  */
1032 
1035  void *user_data,
1036  xmlInputReadCallback ioread,
1037  xmlInputCloseCallback ioclose,
1038  void *ioctx,
1039  xmlCharEncoding enc);
1040 
1044  xmlCharEncoding enc);
1045 
1046 /*
1047  * Node infos.
1048  */
1051  const xmlNodePtr node);
1052 XMLPUBFUN void XMLCALL
1054 XMLPUBFUN void XMLCALL
1056 XMLPUBFUN unsigned long XMLCALL
1058  const xmlNodePtr node);
1059 XMLPUBFUN void XMLCALL
1061  const xmlParserNodeInfoPtr info);
1062 
1063 /*
1064  * External entities handling actually implemented in xmlIO.
1065  */
1066 
1067 XMLPUBFUN void XMLCALL
1072  xmlLoadExternalEntity (const char *URL,
1073  const char *ID,
1074  xmlParserCtxtPtr ctxt);
1075 
1076 /*
1077  * Index lookup, actually implemented in the encoding module
1078  */
1079 XMLPUBFUN long XMLCALL
1081 
1082 /*
1083  * New set of simpler/more flexible APIs
1084  */
1091 typedef enum {
1092  XML_PARSE_RECOVER = 1<<0, /* recover on errors */
1093  XML_PARSE_NOENT = 1<<1, /* substitute entities */
1094  XML_PARSE_DTDLOAD = 1<<2, /* load the external subset */
1095  XML_PARSE_DTDATTR = 1<<3, /* default DTD attributes */
1096  XML_PARSE_DTDVALID = 1<<4, /* validate with the DTD */
1097  XML_PARSE_NOERROR = 1<<5, /* suppress error reports */
1098  XML_PARSE_NOWARNING = 1<<6, /* suppress warning reports */
1099  XML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
1100  XML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
1101  XML_PARSE_SAX1 = 1<<9, /* use the SAX1 interface internally */
1102  XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitution */
1103  XML_PARSE_NONET = 1<<11,/* Forbid network access */
1104  XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionary */
1105  XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */
1106  XML_PARSE_NOCDATA = 1<<14,/* merge CDATA as text nodes */
1107  XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */
1108  XML_PARSE_COMPACT = 1<<16,/* compact small text nodes; no modification of
1109  the tree allowed afterwards (will possibly
1110  crash if you try to modify the tree) */
1111  XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */
1112  XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */
1113  XML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */
1114  XML_PARSE_OLDSAX = 1<<20,/* parse using SAX2 interface before 2.7.0 */
1115  XML_PARSE_IGNORE_ENC= 1<<21,/* ignore internal document encoding hint */
1116  XML_PARSE_BIG_LINES = 1<<22 /* Store big lines numbers in text PSVI field */
1117 } xmlParserOption;
1118 
1119 XMLPUBFUN void XMLCALL
1121 XMLPUBFUN int XMLCALL
1123  const char *chunk,
1124  int size,
1125  const char *filename,
1126  const char *encoding);
1127 XMLPUBFUN int XMLCALL
1129  int options);
1131  xmlReadDoc (const xmlChar *cur,
1132  const char *URL,
1133  const char *encoding,
1134  int options);
1136  xmlReadFile (const char *URL,
1137  const char *encoding,
1138  int options);
1140  xmlReadMemory (const char *buffer,
1141  int size,
1142  const char *URL,
1143  const char *encoding,
1144  int options);
1146  xmlReadFd (int fd,
1147  const char *URL,
1148  const char *encoding,
1149  int options);
1152  xmlInputCloseCallback ioclose,
1153  void *ioctx,
1154  const char *URL,
1155  const char *encoding,
1156  int options);
1159  const xmlChar *cur,
1160  const char *URL,
1161  const char *encoding,
1162  int options);
1165  const char *filename,
1166  const char *encoding,
1167  int options);
1170  const char *buffer,
1171  int size,
1172  const char *URL,
1173  const char *encoding,
1174  int options);
1177  int fd,
1178  const char *URL,
1179  const char *encoding,
1180  int options);
1183  xmlInputReadCallback ioread,
1184  xmlInputCloseCallback ioclose,
1185  void *ioctx,
1186  const char *URL,
1187  const char *encoding,
1188  int options);
1189 
1190 /*
1191  * Library wide options
1192  */
1200 typedef enum {
1234  XML_WITH_NONE = 99999 /* just to be sure of allocation size */
1235 } xmlFeature;
1236 
1237 XMLPUBFUN int XMLCALL
1239 
1240 #ifdef __cplusplus
1241 }
1242 #endif
1243 #endif /* __XML_PARSER_H__ */
internalSubsetSAXFunc internalSubset
Definition: parser.h:722
XMLPUBFUN xmlParserInputPtr XMLCALL xmlNewIOInputStream(xmlParserCtxtPtr ctxt, xmlParserInputBufferPtr input, xmlCharEncoding enc)
xmlParserInput * xmlParserInputPtr
Definition: tree.h:36
INTERNETFEATURELIST feature
Definition: misc.c:1719
processingInstructionSAXFunc processingInstruction
Definition: parser.h:741
XMLPUBFUN int XMLCALL xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, const xmlChar *URL, const xmlChar *ID, xmlNodePtr *lst)
Definition: parser.c:12962
void(XMLCDECL *) typedef const cha LIBXML_ATTR_FORMAT)(2, 3)
Definition: parser.h:621
Definition: pdh_main.c:93
int(* hasInternalSubsetSAXFunc)(void *ctx)
Definition: parser.h:651
xmlParserInputState instate
Definition: parser.h:225
unsigned long sizeentities
Definition: parser.h:306
XMLPUBFUN void XMLCALL xmlSetExternalEntityLoader(xmlExternalEntityLoader f)
void(* setDocumentLocatorSAXFunc)(void *ctx, xmlSAXLocatorPtr loc)
Definition: parser.h:488
XMLPUBFUN xmlDocPtr XMLCALL xmlReadDoc(const xmlChar *cur, const char *URL, const char *encoding, int options)
Definition: parser.c:15196
int * attallocs
Definition: parser.h:284
int * spaceTab
Definition: parser.h:249
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)
Definition: parser.h:694
void(* endElementSAXFunc)(void *ctx, const xmlChar *name)
Definition: parser.h:522
xmlChar * extSubURI
Definition: parser.h:242
endElementNsSAX2Func endElementNs
Definition: parser.h:753
GLuint64EXT * result
Definition: glext.h:11304
xmlParserInputPtr * inputTab
Definition: parser.h:204
void(* unparsedEntityDeclSAXFunc)(void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *notationName)
Definition: parser.h:475
xmlFeature
Definition: parser.h:1200
XMLPUBFUN void XMLCALL xmlInitParser(void)
Definition: parser.c:14670
XMLPUBFUN xmlDocPtr XMLCALL xmlReadFd(int fd, const char *URL, const char *encoding, int options)
Definition: parser.c:15270
void(* cdataBlockSAXFunc)(void *ctx, const xmlChar *value, int len)
Definition: parser.h:598
void(* endDocumentSAXFunc)(void *ctx)
Definition: parser.h:503
struct _tree tree
XMLPUBFUN void XMLCALL xmlCtxtReset(xmlParserCtxtPtr ctxt)
Definition: parser.c:14795
XMLPUBFUN void XMLCALL xmlClearParserCtxt(xmlParserCtxtPtr ctxt)
errorSAXFunc error
Definition: parser.h:785
long checkIndex
Definition: parser.h:237
int pedantic
Definition: parser.h:257
endDocumentSAXFunc endDocument
Definition: parser.h:735
int nsWellFormed
Definition: parser.h:288
setDocumentLocatorSAXFunc setDocumentLocator
Definition: parser.h:733
XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlCreateDocParserCtxt(const xmlChar *cur)
Definition: parser.c:14536
const xmlChar * cur
Definition: parser.h:61
void(XMLCDECL * warningSAXFunc)(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
Definition: parser.h:610
XMLPUBFUN int XMLCALL xmlParserInputRead(xmlParserInputPtr in, int len)
xmlParserInputDeallocate free
Definition: parser.h:72
entityDeclSAXFunc entityDecl
Definition: parser.h:728
attributeDeclSAXFunc attributeDecl
Definition: parser.h:771
xmlAttrPtr freeAttrs
Definition: parser.h:298
int(* hasExternalSubsetSAXFunc)(void *ctx)
Definition: parser.h:661
XMLPUBFUN void XMLCALL xmlFreeParserCtxt(xmlParserCtxtPtr ctxt)
GLuint buffer
Definition: glext.h:5915
xmlNodePtr * nodeTab
Definition: parser.h:210
static int fd
Definition: io.c:51
xmlCharEncoding
Definition: encoding.h:58
XMLPUBFUN xmlExternalEntityLoader XMLCALL xmlGetExternalEntityLoader(void)
#define XMLPUBFUN
Definition: xmlexports.h:61
XMLPUBFUN xmlDocPtr XMLCALL xmlCtxtReadFd(xmlParserCtxtPtr ctxt, int fd, const char *URL, const char *encoding, int options)
Definition: parser.c:15475
fatalErrorSAXFunc fatalError
Definition: parser.h:786
hasInternalSubsetSAXFunc hasInternalSubset
Definition: parser.h:765
elementDeclSAXFunc elementDecl
Definition: parser.h:772
XMLPUBFUN xmlDocPtr XMLCALL xmlReadMemory(const char *buffer, int size, const char *URL, const char *encoding, int options)
Definition: parser.c:15245
externalSubsetSAXFunc externalSubset
Definition: parser.h:789
XMLPUBFUN void XMLCALL xmlStopParser(xmlParserCtxtPtr ctxt)
Definition: parser.c:12578
void(* entityDeclSAXFunc)(void *ctx, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content)
Definition: parser.h:414
int const JOCTET unsigned int datalen
Definition: jpeglib.h:1030
const char * filename
Definition: ioapi.h:135
void(XMLCDECL * fatalErrorSAXFunc)(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
Definition: parser.h:632
warningSAXFunc warning
Definition: parser.h:743
int external
Definition: parser.h:219
unsigned long begin_line
Definition: parser.h:93
long nbChars
Definition: parser.h:236
XMLPUBFUN xmlDocPtr XMLCALL xmlCtxtReadIO(xmlParserCtxtPtr ctxt, xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options)
Definition: parser.c:15519
const xmlChar * version
Definition: parser.h:74
resolveEntitySAXFunc resolveEntity
Definition: parser.h:726
void(* attributeSAXFunc)(void *ctx, const xmlChar *name, const xmlChar *value)
Definition: parser.h:535
const xmlChar * base
Definition: parser.h:60
startElementSAXFunc startElement
Definition: parser.h:777
XMLPUBFUN unsigned long XMLCALL xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq, const xmlNodePtr node)
const xmlChar * name
Definition: parser.h:231
static int sax
Definition: xmllint.c:199
Definition: tree.h:406
referenceSAXFunc reference
Definition: parser.h:779
void(* notationDeclSAXFunc)(void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId)
Definition: parser.h:429
int input_id
Definition: parser.h:314
unsigned int initialized
Definition: parser.h:749
void(* externalSubsetSAXFunc)(void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID)
Definition: parser.h:377
xmlParserInputPtr input
Definition: parser.h:201
int spaceMax
Definition: parser.h:248
int disableSAX
Definition: parser.h:239
int nodeInfoMax
Definition: parser.h:311
int recovery
Definition: parser.h:263
isStandaloneSAXFunc isStandalone
Definition: parser.h:723
unsigned long begin_pos
Definition: parser.h:92
XMLPUBFUN xmlDocPtr XMLCALL xmlReadFile(const char *URL, const char *encoding, int options)
Definition: parser.c:15221
const xmlChar * str_xmlns
Definition: parser.h:274
xmlParserNodeInfo * buffer
Definition: parser.h:103
endElementSAXFunc endElement
Definition: parser.h:778
xmlError lastError
Definition: parser.h:303
startElementSAXFunc startElement
Definition: parser.h:736
XMLPUBFUN int XMLCALL xmlLineNumbersDefault(int val)
int standalone
Definition: parser.h:194
void(* startDocumentSAXFunc)(void *ctx)
Definition: parser.h:496
static size_t elem
Definition: string.c:68
resolveEntitySAXFunc resolveEntity
Definition: parser.h:767
const xmlChar * str_xml
Definition: parser.h:273
void(* processingInstructionSAXFunc)(void *ctx, const xmlChar *target, const xmlChar *data)
Definition: parser.h:578
void(* ignorableWhitespaceSAXFunc)(void *ctx, const xmlChar *ch, int len)
Definition: parser.h:567
int linenumbers
Definition: parser.h:261
void(* attributeDeclSAXFunc)(void *ctx, const xmlChar *elem, const xmlChar *fullname, int type, int def, const xmlChar *defaultValue, xmlEnumerationPtr tree)
Definition: parser.h:445
content
Definition: atl_ax.c:993
int standalone
Definition: parser.h:75
attributeDeclSAXFunc attributeDecl
Definition: parser.h:730
unsigned long consumed
Definition: parser.h:71
int replaceEntities
Definition: parser.h:191
XMLPUBFUN void XMLCALL xmlClearNodeInfoSeq(xmlParserNodeInfoSeqPtr seq)
const WCHAR * str
xmlHashTablePtr attsDefault
Definition: parser.h:286
xmlParserInputState
Definition: parser.h:112
void(* internalSubsetSAXFunc)(void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID)
Definition: parser.h:364
void * _private
Definition: parser.h:258
void(* commentSAXFunc)(void *ctx, const xmlChar *value)
Definition: parser.h:588
cdataBlockSAXFunc cdataBlock
Definition: parser.h:747
int(XMLCALL * xmlInputCloseCallback)(void *context)
Definition: xmlIO.h:63
endElementSAXFunc endElement
Definition: parser.h:737
xmlChar * extSubSystem
Definition: parser.h:243
void(XMLCDECL *) typede void)(XMLCDECL *errorSAXFunc)(void *ctx
Definition: parser.h:620
xmlDictPtr dict
Definition: parser.h:265
setDocumentLocatorSAXFunc setDocumentLocator
Definition: parser.h:774
Definition: dict.c:116
const xmlChar * intSubName
Definition: parser.h:241
ignorableWhitespaceSAXFunc ignorableWhitespace
Definition: parser.h:740
int validate
Definition: parser.h:222
GLuint GLfloat * val
Definition: glext.h:7180
getEntitySAXFunc getEntity
Definition: parser.h:768
const xmlChar * str_xml_ns
Definition: parser.h:275
void(XMLCDECL *) typedef int(* isStandaloneSAXFunc)(void *ctx)
Definition: parser.h:642
XMLPUBFUN long XMLCALL xmlByteConsumed(xmlParserCtxtPtr ctxt)
Definition: encoding.c:2863
int inputMax
Definition: parser.h:203
void(* charactersSAXFunc)(void *ctx, const xmlChar *ch, int len)
Definition: parser.h:555
GLfloat f
Definition: glext.h:7540
void MSVCRT() terminate()
GLsizeiptr size
Definition: glext.h:5919
XMLPUBFUN void XMLCALL xmlInitNodeInfoSeq(xmlParserNodeInfoSeqPtr seq)
int wellFormed
Definition: parser.h:190
void * _private
Definition: parser.h:751
xmlParserErrors
Definition: xmlerror.h:99
xmlNodePtr node
Definition: parser.h:207
int record_info
Definition: parser.h:212
XMLPUBFUN xmlDocPtr XMLCALL xmlReadIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options)
Definition: parser.c:15313
unparsedEntityDeclSAXFunc unparsedEntityDecl
Definition: parser.h:773
XMLPUBFUN int XMLCALL xmlKeepBlanksDefault(int val)
XMLPUBFUN int XMLCALL xmlParseExtParsedEnt(xmlParserCtxtPtr ctxt)
Definition: parser.c:10882
hasInternalSubsetSAXFunc hasInternalSubset
Definition: parser.h:724
int hasPErefs
Definition: parser.h:218
xmlStartTag * pushTab
Definition: parser.h:285
void(* referenceSAXFunc)(void *ctx, const xmlChar *name)
Definition: parser.h:545
int freeElemsNr
Definition: parser.h:295
XMLPUBFUN int XMLCALL xmlCtxtUseOptions(xmlParserCtxtPtr ctxt, int options)
Definition: parser.c:15133
charactersSAXFunc characters
Definition: parser.h:780
getParameterEntitySAXFunc getParameterEntity
Definition: parser.h:787
unsigned long end_pos
Definition: parser.h:94
unparsedEntityDeclSAXFunc unparsedEntityDecl
Definition: parser.h:732
XMLPUBFUN int XMLCALL xmlParserInputGrow(xmlParserInputPtr in, int len)
startDocumentSAXFunc startDocument
Definition: parser.h:775
ignorableWhitespaceSAXFunc ignorableWhitespace
Definition: parser.h:781
xmlEntityPtr(* getParameterEntitySAXFunc)(void *ctx, const xmlChar *name)
Definition: parser.h:401
void(XMLCDECL *) typedef const char msg)
Definition: parser.h:621
isStandaloneSAXFunc isStandalone
Definition: parser.h:764
xmlParserMode
Definition: parser.h:163
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
_In_opt_ PVOID _In_ ULONG _In_ PVOID context
Definition: wdfdriver.h:113
XMLPUBFUN int XMLCALL xmlParseDocument(xmlParserCtxtPtr ctxt)
Definition: parser.c:10689
xmlParserNodeInfoSeq * xmlParserNodeInfoSeqPtr
Definition: parser.h:99
xmlParserNodeInfo * xmlParserNodeInfoPtr
Definition: parser.h:87
XMLPUBFUN xmlParserErrors XMLCALL xmlParseInNodeContext(xmlNodePtr node, const char *data, int datalen, int options, xmlNodePtr *lst)
Definition: parser.c:13490
XMLPUBFUN int XMLCALL xmlCtxtResetPush(xmlParserCtxtPtr ctxt, const char *chunk, int size, const char *filename, const char *encoding)
Definition: parser.c:14899
processingInstructionSAXFunc processingInstruction
Definition: parser.h:782
internalSubsetSAXFunc internalSubset
Definition: parser.h:763
Definition: tree.h:489
void(* elementDeclSAXFunc)(void *ctx, const xmlChar *name, int type, xmlElementContentPtr content)
Definition: parser.h:461
int nodeInfoNr
Definition: parser.h:310
int(XMLCALL * xmlInputReadCallback)(void *context, char *buffer, int len)
Definition: xmlIO.h:54
XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlCreateIOParserCtxt(xmlSAXHandlerPtr sax, void *user_data, xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, xmlCharEncoding enc)
Definition: parser.c:12600
GLint GLint GLsizei GLsizei GLsizei depth
Definition: gl.h:1546
const struct _xmlNode * node
Definition: parser.h:90
xmlDocPtr myDoc
Definition: parser.h:189
void(* startElementSAXFunc)(void *ctx, const xmlChar *name, const xmlChar **atts)
Definition: parser.h:512
const char * fullname
Definition: shader.c:1766
XMLPUBFUN void XMLCALL xmlParserAddNodeInfo(xmlParserCtxtPtr ctxt, const xmlParserNodeInfoPtr info)
xmlParserMode parseMode
Definition: parser.h:304
const xmlChar * encoding
Definition: parser.h:193
xmlStructuredErrorFunc serror
Definition: parser.h:754
unsigned char xmlChar
Definition: xmlstring.h:28
GLenum GLsizei len
Definition: glext.h:6722
struct _xmlSAXHandler * sax
Definition: parser.h:187
int freeAttrsNr
Definition: parser.h:297
GLsizei const GLfloat * value
Definition: glext.h:6069
const xmlChar * version
Definition: parser.h:192
#define ID
Definition: ruserpass.c:36
void * catalogs
Definition: parser.h:262
int loadsubset
Definition: parser.h:260
int(* getColumnNumber)(void *ctx)
Definition: parser.h:327
XMLPUBFUN xmlParserInputPtr XMLCALL xmlLoadExternalEntity(const char *URL, const char *ID, xmlParserCtxtPtr ctxt)
int dictNames
Definition: parser.h:294
int hasExternalSubset
Definition: parser.h:217
ed encoding
Definition: write.c:2825
xmlParserInputPtr entity
Definition: parser.h:252
hasExternalSubsetSAXFunc hasExternalSubset
Definition: parser.h:766
fatalErrorSAXFunc fatalError
Definition: parser.h:745
unsigned long length
Definition: parser.h:102
FxCollectionEntry * cur
xmlParserInputBufferPtr buf
Definition: parser.h:56
endDocumentSAXFunc endDocument
Definition: parser.h:776
errorSAXFunc error
Definition: parser.h:744
void(* endElementNsSAX2Func)(void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI)
Definition: parser.h:715
xmlParserOption
Definition: parser.h:1091
unsigned long sizeentcopy
Definition: parser.h:315
int progressive
Definition: parser.h:264
getEntitySAXFunc getEntity
Definition: parser.h:727
const xmlChar ** atts
Definition: parser.h:266
unsigned long end_line
Definition: parser.h:95
const char * filename
Definition: parser.h:58
notationDeclSAXFunc notationDecl
Definition: parser.h:729
GLenum GLenum GLenum input
Definition: glext.h:9031
xmlParserNodeInfo * nodeInfoTab
Definition: parser.h:312
elementDeclSAXFunc elementDecl
Definition: parser.h:731
GLuint in
Definition: glext.h:9616
externalSubsetSAXFunc externalSubset
Definition: parser.h:748
int inSubset
Definition: parser.h:240
XMLPUBFUN int XMLCALL xmlInitParserCtxt(xmlParserCtxtPtr ctxt)
xmlSAXHandlerV1 * xmlSAXHandlerV1Ptr
Definition: parser.h:761
entityDeclSAXFunc entityDecl
Definition: parser.h:769
cdataBlockSAXFunc cdataBlock
Definition: parser.h:788
xmlHashTablePtr attsSpecial
Definition: parser.h:287
char * directory
Definition: parser.h:228
#define XMLCDECL
Definition: xmlexports.h:52
startDocumentSAXFunc startDocument
Definition: parser.h:734
Definition: tree.h:551
XMLPUBFUN int XMLCALL xmlHasFeature(xmlFeature feature)
Definition: parser.c:885
unsigned long maximum
Definition: parser.h:101
getParameterEntitySAXFunc getParameterEntity
Definition: parser.h:746
const xmlChar ** nsTab
Definition: parser.h:283
xmlParserInputPtr(* xmlExternalEntityLoader)(const char *URL, const char *ID, xmlParserCtxtPtr context)
Definition: parser.h:804
#define XMLCALL
Definition: tree.h:434
const xmlChar * encoding
Definition: parser.h:73
warningSAXFunc warning
Definition: parser.h:784
commentSAXFunc comment
Definition: parser.h:742
Definition: name.c:38
XMLPUBFUN int XMLCALL xmlPedanticParserDefault(int val)
charactersSAXFunc characters
Definition: parser.h:739
XMLPUBFUN xmlDocPtr XMLCALL xmlCtxtReadFile(xmlParserCtxtPtr ctxt, const char *filename, const char *encoding, int options)
Definition: parser.c:15394
int keepBlanks
Definition: parser.h:238
xmlParserNodeInfo * nodeInfo
Definition: parser.h:309
int(* getLineNumber)(void *ctx)
Definition: parser.h:326
GLenum target
Definition: glext.h:7315
XMLPUBFUN int XMLCALL xmlSubstituteEntitiesDefault(int val)
static int recovery
Definition: xmllint.c:115
hasExternalSubsetSAXFunc hasExternalSubset
Definition: parser.h:725
XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlNewParserCtxt(void)
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
XMLPUBFUN xmlDocPtr XMLCALL xmlCtxtReadDoc(xmlParserCtxtPtr ctxt, const xmlChar *cur, const char *URL, const char *encoding, int options)
Definition: parser.c:15360
const char * directory
Definition: parser.h:59
XMLPUBFUN void XMLCALL xmlCleanupParser(void)
Definition: parser.c:14732
xmlEntityPtr(* getEntitySAXFunc)(void *ctx, const xmlChar *name)
Definition: parser.h:390
const xmlChar ** nameTab
Definition: parser.h:234
xmlValidCtxt vctxt
Definition: parser.h:223
int * space
Definition: parser.h:246
referenceSAXFunc reference
Definition: parser.h:738
xmlEntity * xmlEntityPtr
Definition: tree.h:49
commentSAXFunc comment
Definition: parser.h:783
void(* xmlParserInputDeallocate)(xmlChar *str)
Definition: parser.h:52
const xmlChar * end
Definition: parser.h:62
void * userData
Definition: parser.h:188
notationDeclSAXFunc notationDecl
Definition: parser.h:770
xmlParserNodeInfoSeq node_seq
Definition: parser.h:213
xmlNodePtr freeElems
Definition: parser.h:296
startElementNsSAX2Func startElementNs
Definition: parser.h:752
unsigned int initialized
Definition: parser.h:790
_In_ uint16_t _Out_ ULONG * atts
Definition: btrfs_drv.h:1109
XMLPUBFUN const xmlParserNodeInfo *XMLCALL xmlParserFindNodeInfo(const xmlParserCtxtPtr ctxt, const xmlNodePtr node)
Definition: dlist.c:348
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
xmlParserInputPtr(* resolveEntitySAXFunc)(void *ctx, const xmlChar *publicId, const xmlChar *systemId)
Definition: parser.h:352
unsigned long nbentities
Definition: parser.h:305
XMLPUBFUN xmlDocPtr XMLCALL xmlCtxtReadMemory(xmlParserCtxtPtr ctxt, const char *buffer, int size, const char *URL, const char *encoding, int options)
Definition: parser.c:15430
GLuint const GLchar * name
Definition: glext.h:6031