Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
libxml/parser.h@1:26f20484cbdc, 2016-08-25 (annotated)
- Committer:
- pcercuei
- Date:
- Thu Aug 25 10:07:34 2016 +0000
- Revision:
- 1:26f20484cbdc
- Parent:
- 0:03b5121a232e
Add config.h and dummy.c containing empty functions
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| pcercuei | 0:03b5121a232e | 1 | /* |
| pcercuei | 0:03b5121a232e | 2 | * Summary: the core parser module |
| pcercuei | 0:03b5121a232e | 3 | * Description: Interfaces, constants and types related to the XML parser |
| pcercuei | 0:03b5121a232e | 4 | * |
| pcercuei | 0:03b5121a232e | 5 | * Copy: See Copyright for the status of this software. |
| pcercuei | 0:03b5121a232e | 6 | * |
| pcercuei | 0:03b5121a232e | 7 | * Author: Daniel Veillard |
| pcercuei | 0:03b5121a232e | 8 | */ |
| pcercuei | 0:03b5121a232e | 9 | |
| pcercuei | 0:03b5121a232e | 10 | #ifndef __XML_PARSER_H__ |
| pcercuei | 0:03b5121a232e | 11 | #define __XML_PARSER_H__ |
| pcercuei | 0:03b5121a232e | 12 | |
| pcercuei | 0:03b5121a232e | 13 | #include <stdarg.h> |
| pcercuei | 0:03b5121a232e | 14 | |
| pcercuei | 0:03b5121a232e | 15 | #include <libxml/xmlversion.h> |
| pcercuei | 0:03b5121a232e | 16 | #include <libxml/tree.h> |
| pcercuei | 0:03b5121a232e | 17 | #include <libxml/dict.h> |
| pcercuei | 0:03b5121a232e | 18 | #include <libxml/hash.h> |
| pcercuei | 0:03b5121a232e | 19 | #include <libxml/valid.h> |
| pcercuei | 0:03b5121a232e | 20 | #include <libxml/entities.h> |
| pcercuei | 0:03b5121a232e | 21 | #include <libxml/xmlerror.h> |
| pcercuei | 0:03b5121a232e | 22 | #include <libxml/xmlstring.h> |
| pcercuei | 0:03b5121a232e | 23 | |
| pcercuei | 0:03b5121a232e | 24 | #ifdef __cplusplus |
| pcercuei | 0:03b5121a232e | 25 | extern "C" { |
| pcercuei | 0:03b5121a232e | 26 | #endif |
| pcercuei | 0:03b5121a232e | 27 | |
| pcercuei | 0:03b5121a232e | 28 | /** |
| pcercuei | 0:03b5121a232e | 29 | * XML_DEFAULT_VERSION: |
| pcercuei | 0:03b5121a232e | 30 | * |
| pcercuei | 0:03b5121a232e | 31 | * The default version of XML used: 1.0 |
| pcercuei | 0:03b5121a232e | 32 | */ |
| pcercuei | 0:03b5121a232e | 33 | #define XML_DEFAULT_VERSION "1.0" |
| pcercuei | 0:03b5121a232e | 34 | |
| pcercuei | 0:03b5121a232e | 35 | /** |
| pcercuei | 0:03b5121a232e | 36 | * xmlParserInput: |
| pcercuei | 0:03b5121a232e | 37 | * |
| pcercuei | 0:03b5121a232e | 38 | * An xmlParserInput is an input flow for the XML processor. |
| pcercuei | 0:03b5121a232e | 39 | * Each entity parsed is associated an xmlParserInput (except the |
| pcercuei | 0:03b5121a232e | 40 | * few predefined ones). This is the case both for internal entities |
| pcercuei | 0:03b5121a232e | 41 | * - in which case the flow is already completely in memory - or |
| pcercuei | 0:03b5121a232e | 42 | * external entities - in which case we use the buf structure for |
| pcercuei | 0:03b5121a232e | 43 | * progressive reading and I18N conversions to the internal UTF-8 format. |
| pcercuei | 0:03b5121a232e | 44 | */ |
| pcercuei | 0:03b5121a232e | 45 | |
| pcercuei | 0:03b5121a232e | 46 | /** |
| pcercuei | 0:03b5121a232e | 47 | * xmlParserInputDeallocate: |
| pcercuei | 0:03b5121a232e | 48 | * @str: the string to deallocate |
| pcercuei | 0:03b5121a232e | 49 | * |
| pcercuei | 0:03b5121a232e | 50 | * Callback for freeing some parser input allocations. |
| pcercuei | 0:03b5121a232e | 51 | */ |
| pcercuei | 0:03b5121a232e | 52 | typedef void (* xmlParserInputDeallocate)(xmlChar *str); |
| pcercuei | 0:03b5121a232e | 53 | |
| pcercuei | 0:03b5121a232e | 54 | struct _xmlParserInput { |
| pcercuei | 0:03b5121a232e | 55 | /* Input buffer */ |
| pcercuei | 0:03b5121a232e | 56 | xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */ |
| pcercuei | 0:03b5121a232e | 57 | |
| pcercuei | 0:03b5121a232e | 58 | const char *filename; /* The file analyzed, if any */ |
| pcercuei | 0:03b5121a232e | 59 | const char *directory; /* the directory/base of the file */ |
| pcercuei | 0:03b5121a232e | 60 | const xmlChar *base; /* Base of the array to parse */ |
| pcercuei | 0:03b5121a232e | 61 | const xmlChar *cur; /* Current char being parsed */ |
| pcercuei | 0:03b5121a232e | 62 | const xmlChar *end; /* end of the array to parse */ |
| pcercuei | 0:03b5121a232e | 63 | int length; /* length if known */ |
| pcercuei | 0:03b5121a232e | 64 | int line; /* Current line */ |
| pcercuei | 0:03b5121a232e | 65 | int col; /* Current column */ |
| pcercuei | 0:03b5121a232e | 66 | /* |
| pcercuei | 0:03b5121a232e | 67 | * NOTE: consumed is only tested for equality in the parser code, |
| pcercuei | 0:03b5121a232e | 68 | * so even if there is an overflow this should not give troubles |
| pcercuei | 0:03b5121a232e | 69 | * for parsing very large instances. |
| pcercuei | 0:03b5121a232e | 70 | */ |
| pcercuei | 0:03b5121a232e | 71 | unsigned long consumed; /* How many xmlChars already consumed */ |
| pcercuei | 0:03b5121a232e | 72 | xmlParserInputDeallocate free; /* function to deallocate the base */ |
| pcercuei | 0:03b5121a232e | 73 | const xmlChar *encoding; /* the encoding string for entity */ |
| pcercuei | 0:03b5121a232e | 74 | const xmlChar *version; /* the version string for entity */ |
| pcercuei | 0:03b5121a232e | 75 | int standalone; /* Was that entity marked standalone */ |
| pcercuei | 0:03b5121a232e | 76 | int id; /* an unique identifier for the entity */ |
| pcercuei | 0:03b5121a232e | 77 | }; |
| pcercuei | 0:03b5121a232e | 78 | |
| pcercuei | 0:03b5121a232e | 79 | /** |
| pcercuei | 0:03b5121a232e | 80 | * xmlParserNodeInfo: |
| pcercuei | 0:03b5121a232e | 81 | * |
| pcercuei | 0:03b5121a232e | 82 | * The parser can be asked to collect Node informations, i.e. at what |
| pcercuei | 0:03b5121a232e | 83 | * place in the file they were detected. |
| pcercuei | 0:03b5121a232e | 84 | * NOTE: This is off by default and not very well tested. |
| pcercuei | 0:03b5121a232e | 85 | */ |
| pcercuei | 0:03b5121a232e | 86 | typedef struct _xmlParserNodeInfo xmlParserNodeInfo; |
| pcercuei | 0:03b5121a232e | 87 | typedef xmlParserNodeInfo *xmlParserNodeInfoPtr; |
| pcercuei | 0:03b5121a232e | 88 | |
| pcercuei | 0:03b5121a232e | 89 | struct _xmlParserNodeInfo { |
| pcercuei | 0:03b5121a232e | 90 | const struct _xmlNode* node; |
| pcercuei | 0:03b5121a232e | 91 | /* Position & line # that text that created the node begins & ends on */ |
| pcercuei | 0:03b5121a232e | 92 | unsigned long begin_pos; |
| pcercuei | 0:03b5121a232e | 93 | unsigned long begin_line; |
| pcercuei | 0:03b5121a232e | 94 | unsigned long end_pos; |
| pcercuei | 0:03b5121a232e | 95 | unsigned long end_line; |
| pcercuei | 0:03b5121a232e | 96 | }; |
| pcercuei | 0:03b5121a232e | 97 | |
| pcercuei | 0:03b5121a232e | 98 | typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq; |
| pcercuei | 0:03b5121a232e | 99 | typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr; |
| pcercuei | 0:03b5121a232e | 100 | struct _xmlParserNodeInfoSeq { |
| pcercuei | 0:03b5121a232e | 101 | unsigned long maximum; |
| pcercuei | 0:03b5121a232e | 102 | unsigned long length; |
| pcercuei | 0:03b5121a232e | 103 | xmlParserNodeInfo* buffer; |
| pcercuei | 0:03b5121a232e | 104 | }; |
| pcercuei | 0:03b5121a232e | 105 | |
| pcercuei | 0:03b5121a232e | 106 | /** |
| pcercuei | 0:03b5121a232e | 107 | * xmlParserInputState: |
| pcercuei | 0:03b5121a232e | 108 | * |
| pcercuei | 0:03b5121a232e | 109 | * The parser is now working also as a state based parser. |
| pcercuei | 0:03b5121a232e | 110 | * The recursive one use the state info for entities processing. |
| pcercuei | 0:03b5121a232e | 111 | */ |
| pcercuei | 0:03b5121a232e | 112 | typedef enum { |
| pcercuei | 0:03b5121a232e | 113 | XML_PARSER_EOF = -1, /* nothing is to be parsed */ |
| pcercuei | 0:03b5121a232e | 114 | XML_PARSER_START = 0, /* nothing has been parsed */ |
| pcercuei | 0:03b5121a232e | 115 | XML_PARSER_MISC, /* Misc* before int subset */ |
| pcercuei | 0:03b5121a232e | 116 | XML_PARSER_PI, /* Within a processing instruction */ |
| pcercuei | 0:03b5121a232e | 117 | XML_PARSER_DTD, /* within some DTD content */ |
| pcercuei | 0:03b5121a232e | 118 | XML_PARSER_PROLOG, /* Misc* after internal subset */ |
| pcercuei | 0:03b5121a232e | 119 | XML_PARSER_COMMENT, /* within a comment */ |
| pcercuei | 0:03b5121a232e | 120 | XML_PARSER_START_TAG, /* within a start tag */ |
| pcercuei | 0:03b5121a232e | 121 | XML_PARSER_CONTENT, /* within the content */ |
| pcercuei | 0:03b5121a232e | 122 | XML_PARSER_CDATA_SECTION, /* within a CDATA section */ |
| pcercuei | 0:03b5121a232e | 123 | XML_PARSER_END_TAG, /* within a closing tag */ |
| pcercuei | 0:03b5121a232e | 124 | XML_PARSER_ENTITY_DECL, /* within an entity declaration */ |
| pcercuei | 0:03b5121a232e | 125 | XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */ |
| pcercuei | 0:03b5121a232e | 126 | XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */ |
| pcercuei | 0:03b5121a232e | 127 | XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */ |
| pcercuei | 0:03b5121a232e | 128 | XML_PARSER_EPILOG, /* the Misc* after the last end tag */ |
| pcercuei | 0:03b5121a232e | 129 | XML_PARSER_IGNORE, /* within an IGNORED section */ |
| pcercuei | 0:03b5121a232e | 130 | XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */ |
| pcercuei | 0:03b5121a232e | 131 | } xmlParserInputState; |
| pcercuei | 0:03b5121a232e | 132 | |
| pcercuei | 0:03b5121a232e | 133 | /** |
| pcercuei | 0:03b5121a232e | 134 | * XML_DETECT_IDS: |
| pcercuei | 0:03b5121a232e | 135 | * |
| pcercuei | 0:03b5121a232e | 136 | * Bit in the loadsubset context field to tell to do ID/REFs lookups. |
| pcercuei | 0:03b5121a232e | 137 | * Use it to initialize xmlLoadExtDtdDefaultValue. |
| pcercuei | 0:03b5121a232e | 138 | */ |
| pcercuei | 0:03b5121a232e | 139 | #define XML_DETECT_IDS 2 |
| pcercuei | 0:03b5121a232e | 140 | |
| pcercuei | 0:03b5121a232e | 141 | /** |
| pcercuei | 0:03b5121a232e | 142 | * XML_COMPLETE_ATTRS: |
| pcercuei | 0:03b5121a232e | 143 | * |
| pcercuei | 0:03b5121a232e | 144 | * Bit in the loadsubset context field to tell to do complete the |
| pcercuei | 0:03b5121a232e | 145 | * elements attributes lists with the ones defaulted from the DTDs. |
| pcercuei | 0:03b5121a232e | 146 | * Use it to initialize xmlLoadExtDtdDefaultValue. |
| pcercuei | 0:03b5121a232e | 147 | */ |
| pcercuei | 0:03b5121a232e | 148 | #define XML_COMPLETE_ATTRS 4 |
| pcercuei | 0:03b5121a232e | 149 | |
| pcercuei | 0:03b5121a232e | 150 | /** |
| pcercuei | 0:03b5121a232e | 151 | * XML_SKIP_IDS: |
| pcercuei | 0:03b5121a232e | 152 | * |
| pcercuei | 0:03b5121a232e | 153 | * Bit in the loadsubset context field to tell to not do ID/REFs registration. |
| pcercuei | 0:03b5121a232e | 154 | * Used to initialize xmlLoadExtDtdDefaultValue in some special cases. |
| pcercuei | 0:03b5121a232e | 155 | */ |
| pcercuei | 0:03b5121a232e | 156 | #define XML_SKIP_IDS 8 |
| pcercuei | 0:03b5121a232e | 157 | |
| pcercuei | 0:03b5121a232e | 158 | /** |
| pcercuei | 0:03b5121a232e | 159 | * xmlParserMode: |
| pcercuei | 0:03b5121a232e | 160 | * |
| pcercuei | 0:03b5121a232e | 161 | * A parser can operate in various modes |
| pcercuei | 0:03b5121a232e | 162 | */ |
| pcercuei | 0:03b5121a232e | 163 | typedef enum { |
| pcercuei | 0:03b5121a232e | 164 | XML_PARSE_UNKNOWN = 0, |
| pcercuei | 0:03b5121a232e | 165 | XML_PARSE_DOM = 1, |
| pcercuei | 0:03b5121a232e | 166 | XML_PARSE_SAX = 2, |
| pcercuei | 0:03b5121a232e | 167 | XML_PARSE_PUSH_DOM = 3, |
| pcercuei | 0:03b5121a232e | 168 | XML_PARSE_PUSH_SAX = 4, |
| pcercuei | 0:03b5121a232e | 169 | XML_PARSE_READER = 5 |
| pcercuei | 0:03b5121a232e | 170 | } xmlParserMode; |
| pcercuei | 0:03b5121a232e | 171 | |
| pcercuei | 0:03b5121a232e | 172 | /** |
| pcercuei | 0:03b5121a232e | 173 | * xmlParserCtxt: |
| pcercuei | 0:03b5121a232e | 174 | * |
| pcercuei | 0:03b5121a232e | 175 | * The parser context. |
| pcercuei | 0:03b5121a232e | 176 | * NOTE This doesn't completely define the parser state, the (current ?) |
| pcercuei | 0:03b5121a232e | 177 | * design of the parser uses recursive function calls since this allow |
| pcercuei | 0:03b5121a232e | 178 | * and easy mapping from the production rules of the specification |
| pcercuei | 0:03b5121a232e | 179 | * to the actual code. The drawback is that the actual function call |
| pcercuei | 0:03b5121a232e | 180 | * also reflect the parser state. However most of the parsing routines |
| pcercuei | 0:03b5121a232e | 181 | * takes as the only argument the parser context pointer, so migrating |
| pcercuei | 0:03b5121a232e | 182 | * to a state based parser for progressive parsing shouldn't be too hard. |
| pcercuei | 0:03b5121a232e | 183 | */ |
| pcercuei | 0:03b5121a232e | 184 | struct _xmlParserCtxt { |
| pcercuei | 0:03b5121a232e | 185 | struct _xmlSAXHandler *sax; /* The SAX handler */ |
| pcercuei | 0:03b5121a232e | 186 | void *userData; /* For SAX interface only, used by DOM build */ |
| pcercuei | 0:03b5121a232e | 187 | xmlDocPtr myDoc; /* the document being built */ |
| pcercuei | 0:03b5121a232e | 188 | int wellFormed; /* is the document well formed */ |
| pcercuei | 0:03b5121a232e | 189 | int replaceEntities; /* shall we replace entities ? */ |
| pcercuei | 0:03b5121a232e | 190 | const xmlChar *version; /* the XML version string */ |
| pcercuei | 0:03b5121a232e | 191 | const xmlChar *encoding; /* the declared encoding, if any */ |
| pcercuei | 0:03b5121a232e | 192 | int standalone; /* standalone document */ |
| pcercuei | 0:03b5121a232e | 193 | int html; /* an HTML(1)/Docbook(2) document |
| pcercuei | 0:03b5121a232e | 194 | * 3 is HTML after <head> |
| pcercuei | 0:03b5121a232e | 195 | * 10 is HTML after <body> |
| pcercuei | 0:03b5121a232e | 196 | */ |
| pcercuei | 0:03b5121a232e | 197 | |
| pcercuei | 0:03b5121a232e | 198 | /* Input stream stack */ |
| pcercuei | 0:03b5121a232e | 199 | xmlParserInputPtr input; /* Current input stream */ |
| pcercuei | 0:03b5121a232e | 200 | int inputNr; /* Number of current input streams */ |
| pcercuei | 0:03b5121a232e | 201 | int inputMax; /* Max number of input streams */ |
| pcercuei | 0:03b5121a232e | 202 | xmlParserInputPtr *inputTab; /* stack of inputs */ |
| pcercuei | 0:03b5121a232e | 203 | |
| pcercuei | 0:03b5121a232e | 204 | /* Node analysis stack only used for DOM building */ |
| pcercuei | 0:03b5121a232e | 205 | xmlNodePtr node; /* Current parsed Node */ |
| pcercuei | 0:03b5121a232e | 206 | int nodeNr; /* Depth of the parsing stack */ |
| pcercuei | 0:03b5121a232e | 207 | int nodeMax; /* Max depth of the parsing stack */ |
| pcercuei | 0:03b5121a232e | 208 | xmlNodePtr *nodeTab; /* array of nodes */ |
| pcercuei | 0:03b5121a232e | 209 | |
| pcercuei | 0:03b5121a232e | 210 | int record_info; /* Whether node info should be kept */ |
| pcercuei | 0:03b5121a232e | 211 | xmlParserNodeInfoSeq node_seq; /* info about each node parsed */ |
| pcercuei | 0:03b5121a232e | 212 | |
| pcercuei | 0:03b5121a232e | 213 | int errNo; /* error code */ |
| pcercuei | 0:03b5121a232e | 214 | |
| pcercuei | 0:03b5121a232e | 215 | int hasExternalSubset; /* reference and external subset */ |
| pcercuei | 0:03b5121a232e | 216 | int hasPErefs; /* the internal subset has PE refs */ |
| pcercuei | 0:03b5121a232e | 217 | int external; /* are we parsing an external entity */ |
| pcercuei | 0:03b5121a232e | 218 | |
| pcercuei | 0:03b5121a232e | 219 | int valid; /* is the document valid */ |
| pcercuei | 0:03b5121a232e | 220 | int validate; /* shall we try to validate ? */ |
| pcercuei | 0:03b5121a232e | 221 | xmlValidCtxt vctxt; /* The validity context */ |
| pcercuei | 0:03b5121a232e | 222 | |
| pcercuei | 0:03b5121a232e | 223 | xmlParserInputState instate; /* current type of input */ |
| pcercuei | 0:03b5121a232e | 224 | int token; /* next char look-ahead */ |
| pcercuei | 0:03b5121a232e | 225 | |
| pcercuei | 0:03b5121a232e | 226 | char *directory; /* the data directory */ |
| pcercuei | 0:03b5121a232e | 227 | |
| pcercuei | 0:03b5121a232e | 228 | /* Node name stack */ |
| pcercuei | 0:03b5121a232e | 229 | const xmlChar *name; /* Current parsed Node */ |
| pcercuei | 0:03b5121a232e | 230 | int nameNr; /* Depth of the parsing stack */ |
| pcercuei | 0:03b5121a232e | 231 | int nameMax; /* Max depth of the parsing stack */ |
| pcercuei | 0:03b5121a232e | 232 | const xmlChar * *nameTab; /* array of nodes */ |
| pcercuei | 0:03b5121a232e | 233 | |
| pcercuei | 0:03b5121a232e | 234 | long nbChars; /* number of xmlChar processed */ |
| pcercuei | 0:03b5121a232e | 235 | long checkIndex; /* used by progressive parsing lookup */ |
| pcercuei | 0:03b5121a232e | 236 | int keepBlanks; /* ugly but ... */ |
| pcercuei | 0:03b5121a232e | 237 | int disableSAX; /* SAX callbacks are disabled */ |
| pcercuei | 0:03b5121a232e | 238 | int inSubset; /* Parsing is in int 1/ext 2 subset */ |
| pcercuei | 0:03b5121a232e | 239 | const xmlChar * intSubName; /* name of subset */ |
| pcercuei | 0:03b5121a232e | 240 | xmlChar * extSubURI; /* URI of external subset */ |
| pcercuei | 0:03b5121a232e | 241 | xmlChar * extSubSystem; /* SYSTEM ID of external subset */ |
| pcercuei | 0:03b5121a232e | 242 | |
| pcercuei | 0:03b5121a232e | 243 | /* xml:space values */ |
| pcercuei | 0:03b5121a232e | 244 | int * space; /* Should the parser preserve spaces */ |
| pcercuei | 0:03b5121a232e | 245 | int spaceNr; /* Depth of the parsing stack */ |
| pcercuei | 0:03b5121a232e | 246 | int spaceMax; /* Max depth of the parsing stack */ |
| pcercuei | 0:03b5121a232e | 247 | int * spaceTab; /* array of space infos */ |
| pcercuei | 0:03b5121a232e | 248 | |
| pcercuei | 0:03b5121a232e | 249 | int depth; /* to prevent entity substitution loops */ |
| pcercuei | 0:03b5121a232e | 250 | xmlParserInputPtr entity; /* used to check entities boundaries */ |
| pcercuei | 0:03b5121a232e | 251 | int charset; /* encoding of the in-memory content |
| pcercuei | 0:03b5121a232e | 252 | actually an xmlCharEncoding */ |
| pcercuei | 0:03b5121a232e | 253 | int nodelen; /* Those two fields are there to */ |
| pcercuei | 0:03b5121a232e | 254 | int nodemem; /* Speed up large node parsing */ |
| pcercuei | 0:03b5121a232e | 255 | int pedantic; /* signal pedantic warnings */ |
| pcercuei | 0:03b5121a232e | 256 | void *_private; /* For user data, libxml won't touch it */ |
| pcercuei | 0:03b5121a232e | 257 | |
| pcercuei | 0:03b5121a232e | 258 | int loadsubset; /* should the external subset be loaded */ |
| pcercuei | 0:03b5121a232e | 259 | int linenumbers; /* set line number in element content */ |
| pcercuei | 0:03b5121a232e | 260 | void *catalogs; /* document's own catalog */ |
| pcercuei | 0:03b5121a232e | 261 | int recovery; /* run in recovery mode */ |
| pcercuei | 0:03b5121a232e | 262 | int progressive; /* is this a progressive parsing */ |
| pcercuei | 0:03b5121a232e | 263 | xmlDictPtr dict; /* dictionnary for the parser */ |
| pcercuei | 0:03b5121a232e | 264 | const xmlChar * *atts; /* array for the attributes callbacks */ |
| pcercuei | 0:03b5121a232e | 265 | int maxatts; /* the size of the array */ |
| pcercuei | 0:03b5121a232e | 266 | int docdict; /* use strings from dict to build tree */ |
| pcercuei | 0:03b5121a232e | 267 | |
| pcercuei | 0:03b5121a232e | 268 | /* |
| pcercuei | 0:03b5121a232e | 269 | * pre-interned strings |
| pcercuei | 0:03b5121a232e | 270 | */ |
| pcercuei | 0:03b5121a232e | 271 | const xmlChar *str_xml; |
| pcercuei | 0:03b5121a232e | 272 | const xmlChar *str_xmlns; |
| pcercuei | 0:03b5121a232e | 273 | const xmlChar *str_xml_ns; |
| pcercuei | 0:03b5121a232e | 274 | |
| pcercuei | 0:03b5121a232e | 275 | /* |
| pcercuei | 0:03b5121a232e | 276 | * Everything below is used only by the new SAX mode |
| pcercuei | 0:03b5121a232e | 277 | */ |
| pcercuei | 0:03b5121a232e | 278 | int sax2; /* operating in the new SAX mode */ |
| pcercuei | 0:03b5121a232e | 279 | int nsNr; /* the number of inherited namespaces */ |
| pcercuei | 0:03b5121a232e | 280 | int nsMax; /* the size of the arrays */ |
| pcercuei | 0:03b5121a232e | 281 | const xmlChar * *nsTab; /* the array of prefix/namespace name */ |
| pcercuei | 0:03b5121a232e | 282 | int *attallocs; /* which attribute were allocated */ |
| pcercuei | 0:03b5121a232e | 283 | void * *pushTab; /* array of data for push */ |
| pcercuei | 0:03b5121a232e | 284 | xmlHashTablePtr attsDefault; /* defaulted attributes if any */ |
| pcercuei | 0:03b5121a232e | 285 | xmlHashTablePtr attsSpecial; /* non-CDATA attributes if any */ |
| pcercuei | 0:03b5121a232e | 286 | int nsWellFormed; /* is the document XML Nanespace okay */ |
| pcercuei | 0:03b5121a232e | 287 | int options; /* Extra options */ |
| pcercuei | 0:03b5121a232e | 288 | |
| pcercuei | 0:03b5121a232e | 289 | /* |
| pcercuei | 0:03b5121a232e | 290 | * Those fields are needed only for treaming parsing so far |
| pcercuei | 0:03b5121a232e | 291 | */ |
| pcercuei | 0:03b5121a232e | 292 | int dictNames; /* Use dictionary names for the tree */ |
| pcercuei | 0:03b5121a232e | 293 | int freeElemsNr; /* number of freed element nodes */ |
| pcercuei | 0:03b5121a232e | 294 | xmlNodePtr freeElems; /* List of freed element nodes */ |
| pcercuei | 0:03b5121a232e | 295 | int freeAttrsNr; /* number of freed attributes nodes */ |
| pcercuei | 0:03b5121a232e | 296 | xmlAttrPtr freeAttrs; /* List of freed attributes nodes */ |
| pcercuei | 0:03b5121a232e | 297 | |
| pcercuei | 0:03b5121a232e | 298 | /* |
| pcercuei | 0:03b5121a232e | 299 | * the complete error informations for the last error. |
| pcercuei | 0:03b5121a232e | 300 | */ |
| pcercuei | 0:03b5121a232e | 301 | xmlError lastError; |
| pcercuei | 0:03b5121a232e | 302 | xmlParserMode parseMode; /* the parser mode */ |
| pcercuei | 0:03b5121a232e | 303 | unsigned long nbentities; /* number of entities references */ |
| pcercuei | 0:03b5121a232e | 304 | unsigned long sizeentities; /* size of parsed entities */ |
| pcercuei | 0:03b5121a232e | 305 | |
| pcercuei | 0:03b5121a232e | 306 | /* for use by HTML non-recursive parser */ |
| pcercuei | 0:03b5121a232e | 307 | xmlParserNodeInfo *nodeInfo; /* Current NodeInfo */ |
| pcercuei | 0:03b5121a232e | 308 | int nodeInfoNr; /* Depth of the parsing stack */ |
| pcercuei | 0:03b5121a232e | 309 | int nodeInfoMax; /* Max depth of the parsing stack */ |
| pcercuei | 0:03b5121a232e | 310 | xmlParserNodeInfo *nodeInfoTab; /* array of nodeInfos */ |
| pcercuei | 0:03b5121a232e | 311 | |
| pcercuei | 0:03b5121a232e | 312 | int input_id; /* we need to label inputs */ |
| pcercuei | 0:03b5121a232e | 313 | unsigned long sizeentcopy; /* volume of entity copy */ |
| pcercuei | 0:03b5121a232e | 314 | }; |
| pcercuei | 0:03b5121a232e | 315 | |
| pcercuei | 0:03b5121a232e | 316 | /** |
| pcercuei | 0:03b5121a232e | 317 | * xmlSAXLocator: |
| pcercuei | 0:03b5121a232e | 318 | * |
| pcercuei | 0:03b5121a232e | 319 | * A SAX Locator. |
| pcercuei | 0:03b5121a232e | 320 | */ |
| pcercuei | 0:03b5121a232e | 321 | struct _xmlSAXLocator { |
| pcercuei | 0:03b5121a232e | 322 | const xmlChar *(*getPublicId)(void *ctx); |
| pcercuei | 0:03b5121a232e | 323 | const xmlChar *(*getSystemId)(void *ctx); |
| pcercuei | 0:03b5121a232e | 324 | int (*getLineNumber)(void *ctx); |
| pcercuei | 0:03b5121a232e | 325 | int (*getColumnNumber)(void *ctx); |
| pcercuei | 0:03b5121a232e | 326 | }; |
| pcercuei | 0:03b5121a232e | 327 | |
| pcercuei | 0:03b5121a232e | 328 | /** |
| pcercuei | 0:03b5121a232e | 329 | * xmlSAXHandler: |
| pcercuei | 0:03b5121a232e | 330 | * |
| pcercuei | 0:03b5121a232e | 331 | * A SAX handler is bunch of callbacks called by the parser when processing |
| pcercuei | 0:03b5121a232e | 332 | * of the input generate data or structure informations. |
| pcercuei | 0:03b5121a232e | 333 | */ |
| pcercuei | 0:03b5121a232e | 334 | |
| pcercuei | 0:03b5121a232e | 335 | /** |
| pcercuei | 0:03b5121a232e | 336 | * resolveEntitySAXFunc: |
| pcercuei | 0:03b5121a232e | 337 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 338 | * @publicId: The public ID of the entity |
| pcercuei | 0:03b5121a232e | 339 | * @systemId: The system ID of the entity |
| pcercuei | 0:03b5121a232e | 340 | * |
| pcercuei | 0:03b5121a232e | 341 | * Callback: |
| pcercuei | 0:03b5121a232e | 342 | * The entity loader, to control the loading of external entities, |
| pcercuei | 0:03b5121a232e | 343 | * the application can either: |
| pcercuei | 0:03b5121a232e | 344 | * - override this resolveEntity() callback in the SAX block |
| pcercuei | 0:03b5121a232e | 345 | * - or better use the xmlSetExternalEntityLoader() function to |
| pcercuei | 0:03b5121a232e | 346 | * set up it's own entity resolution routine |
| pcercuei | 0:03b5121a232e | 347 | * |
| pcercuei | 0:03b5121a232e | 348 | * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. |
| pcercuei | 0:03b5121a232e | 349 | */ |
| pcercuei | 0:03b5121a232e | 350 | typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 351 | const xmlChar *publicId, |
| pcercuei | 0:03b5121a232e | 352 | const xmlChar *systemId); |
| pcercuei | 0:03b5121a232e | 353 | /** |
| pcercuei | 0:03b5121a232e | 354 | * internalSubsetSAXFunc: |
| pcercuei | 0:03b5121a232e | 355 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 356 | * @name: the root element name |
| pcercuei | 0:03b5121a232e | 357 | * @ExternalID: the external ID |
| pcercuei | 0:03b5121a232e | 358 | * @SystemID: the SYSTEM ID (e.g. filename or URL) |
| pcercuei | 0:03b5121a232e | 359 | * |
| pcercuei | 0:03b5121a232e | 360 | * Callback on internal subset declaration. |
| pcercuei | 0:03b5121a232e | 361 | */ |
| pcercuei | 0:03b5121a232e | 362 | typedef void (*internalSubsetSAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 363 | const xmlChar *name, |
| pcercuei | 0:03b5121a232e | 364 | const xmlChar *ExternalID, |
| pcercuei | 0:03b5121a232e | 365 | const xmlChar *SystemID); |
| pcercuei | 0:03b5121a232e | 366 | /** |
| pcercuei | 0:03b5121a232e | 367 | * externalSubsetSAXFunc: |
| pcercuei | 0:03b5121a232e | 368 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 369 | * @name: the root element name |
| pcercuei | 0:03b5121a232e | 370 | * @ExternalID: the external ID |
| pcercuei | 0:03b5121a232e | 371 | * @SystemID: the SYSTEM ID (e.g. filename or URL) |
| pcercuei | 0:03b5121a232e | 372 | * |
| pcercuei | 0:03b5121a232e | 373 | * Callback on external subset declaration. |
| pcercuei | 0:03b5121a232e | 374 | */ |
| pcercuei | 0:03b5121a232e | 375 | typedef void (*externalSubsetSAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 376 | const xmlChar *name, |
| pcercuei | 0:03b5121a232e | 377 | const xmlChar *ExternalID, |
| pcercuei | 0:03b5121a232e | 378 | const xmlChar *SystemID); |
| pcercuei | 0:03b5121a232e | 379 | /** |
| pcercuei | 0:03b5121a232e | 380 | * getEntitySAXFunc: |
| pcercuei | 0:03b5121a232e | 381 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 382 | * @name: The entity name |
| pcercuei | 0:03b5121a232e | 383 | * |
| pcercuei | 0:03b5121a232e | 384 | * Get an entity by name. |
| pcercuei | 0:03b5121a232e | 385 | * |
| pcercuei | 0:03b5121a232e | 386 | * Returns the xmlEntityPtr if found. |
| pcercuei | 0:03b5121a232e | 387 | */ |
| pcercuei | 0:03b5121a232e | 388 | typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 389 | const xmlChar *name); |
| pcercuei | 0:03b5121a232e | 390 | /** |
| pcercuei | 0:03b5121a232e | 391 | * getParameterEntitySAXFunc: |
| pcercuei | 0:03b5121a232e | 392 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 393 | * @name: The entity name |
| pcercuei | 0:03b5121a232e | 394 | * |
| pcercuei | 0:03b5121a232e | 395 | * Get a parameter entity by name. |
| pcercuei | 0:03b5121a232e | 396 | * |
| pcercuei | 0:03b5121a232e | 397 | * Returns the xmlEntityPtr if found. |
| pcercuei | 0:03b5121a232e | 398 | */ |
| pcercuei | 0:03b5121a232e | 399 | typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 400 | const xmlChar *name); |
| pcercuei | 0:03b5121a232e | 401 | /** |
| pcercuei | 0:03b5121a232e | 402 | * entityDeclSAXFunc: |
| pcercuei | 0:03b5121a232e | 403 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 404 | * @name: the entity name |
| pcercuei | 0:03b5121a232e | 405 | * @type: the entity type |
| pcercuei | 0:03b5121a232e | 406 | * @publicId: The public ID of the entity |
| pcercuei | 0:03b5121a232e | 407 | * @systemId: The system ID of the entity |
| pcercuei | 0:03b5121a232e | 408 | * @content: the entity value (without processing). |
| pcercuei | 0:03b5121a232e | 409 | * |
| pcercuei | 0:03b5121a232e | 410 | * An entity definition has been parsed. |
| pcercuei | 0:03b5121a232e | 411 | */ |
| pcercuei | 0:03b5121a232e | 412 | typedef void (*entityDeclSAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 413 | const xmlChar *name, |
| pcercuei | 0:03b5121a232e | 414 | int type, |
| pcercuei | 0:03b5121a232e | 415 | const xmlChar *publicId, |
| pcercuei | 0:03b5121a232e | 416 | const xmlChar *systemId, |
| pcercuei | 0:03b5121a232e | 417 | xmlChar *content); |
| pcercuei | 0:03b5121a232e | 418 | /** |
| pcercuei | 0:03b5121a232e | 419 | * notationDeclSAXFunc: |
| pcercuei | 0:03b5121a232e | 420 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 421 | * @name: The name of the notation |
| pcercuei | 0:03b5121a232e | 422 | * @publicId: The public ID of the entity |
| pcercuei | 0:03b5121a232e | 423 | * @systemId: The system ID of the entity |
| pcercuei | 0:03b5121a232e | 424 | * |
| pcercuei | 0:03b5121a232e | 425 | * What to do when a notation declaration has been parsed. |
| pcercuei | 0:03b5121a232e | 426 | */ |
| pcercuei | 0:03b5121a232e | 427 | typedef void (*notationDeclSAXFunc)(void *ctx, |
| pcercuei | 0:03b5121a232e | 428 | const xmlChar *name, |
| pcercuei | 0:03b5121a232e | 429 | const xmlChar *publicId, |
| pcercuei | 0:03b5121a232e | 430 | const xmlChar *systemId); |
| pcercuei | 0:03b5121a232e | 431 | /** |
| pcercuei | 0:03b5121a232e | 432 | * attributeDeclSAXFunc: |
| pcercuei | 0:03b5121a232e | 433 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 434 | * @elem: the name of the element |
| pcercuei | 0:03b5121a232e | 435 | * @fullname: the attribute name |
| pcercuei | 0:03b5121a232e | 436 | * @type: the attribute type |
| pcercuei | 0:03b5121a232e | 437 | * @def: the type of default value |
| pcercuei | 0:03b5121a232e | 438 | * @defaultValue: the attribute default value |
| pcercuei | 0:03b5121a232e | 439 | * @tree: the tree of enumerated value set |
| pcercuei | 0:03b5121a232e | 440 | * |
| pcercuei | 0:03b5121a232e | 441 | * An attribute definition has been parsed. |
| pcercuei | 0:03b5121a232e | 442 | */ |
| pcercuei | 0:03b5121a232e | 443 | typedef void (*attributeDeclSAXFunc)(void *ctx, |
| pcercuei | 0:03b5121a232e | 444 | const xmlChar *elem, |
| pcercuei | 0:03b5121a232e | 445 | const xmlChar *fullname, |
| pcercuei | 0:03b5121a232e | 446 | int type, |
| pcercuei | 0:03b5121a232e | 447 | int def, |
| pcercuei | 0:03b5121a232e | 448 | const xmlChar *defaultValue, |
| pcercuei | 0:03b5121a232e | 449 | xmlEnumerationPtr tree); |
| pcercuei | 0:03b5121a232e | 450 | /** |
| pcercuei | 0:03b5121a232e | 451 | * elementDeclSAXFunc: |
| pcercuei | 0:03b5121a232e | 452 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 453 | * @name: the element name |
| pcercuei | 0:03b5121a232e | 454 | * @type: the element type |
| pcercuei | 0:03b5121a232e | 455 | * @content: the element value tree |
| pcercuei | 0:03b5121a232e | 456 | * |
| pcercuei | 0:03b5121a232e | 457 | * An element definition has been parsed. |
| pcercuei | 0:03b5121a232e | 458 | */ |
| pcercuei | 0:03b5121a232e | 459 | typedef void (*elementDeclSAXFunc)(void *ctx, |
| pcercuei | 0:03b5121a232e | 460 | const xmlChar *name, |
| pcercuei | 0:03b5121a232e | 461 | int type, |
| pcercuei | 0:03b5121a232e | 462 | xmlElementContentPtr content); |
| pcercuei | 0:03b5121a232e | 463 | /** |
| pcercuei | 0:03b5121a232e | 464 | * unparsedEntityDeclSAXFunc: |
| pcercuei | 0:03b5121a232e | 465 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 466 | * @name: The name of the entity |
| pcercuei | 0:03b5121a232e | 467 | * @publicId: The public ID of the entity |
| pcercuei | 0:03b5121a232e | 468 | * @systemId: The system ID of the entity |
| pcercuei | 0:03b5121a232e | 469 | * @notationName: the name of the notation |
| pcercuei | 0:03b5121a232e | 470 | * |
| pcercuei | 0:03b5121a232e | 471 | * What to do when an unparsed entity declaration is parsed. |
| pcercuei | 0:03b5121a232e | 472 | */ |
| pcercuei | 0:03b5121a232e | 473 | typedef void (*unparsedEntityDeclSAXFunc)(void *ctx, |
| pcercuei | 0:03b5121a232e | 474 | const xmlChar *name, |
| pcercuei | 0:03b5121a232e | 475 | const xmlChar *publicId, |
| pcercuei | 0:03b5121a232e | 476 | const xmlChar *systemId, |
| pcercuei | 0:03b5121a232e | 477 | const xmlChar *notationName); |
| pcercuei | 0:03b5121a232e | 478 | /** |
| pcercuei | 0:03b5121a232e | 479 | * setDocumentLocatorSAXFunc: |
| pcercuei | 0:03b5121a232e | 480 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 481 | * @loc: A SAX Locator |
| pcercuei | 0:03b5121a232e | 482 | * |
| pcercuei | 0:03b5121a232e | 483 | * Receive the document locator at startup, actually xmlDefaultSAXLocator. |
| pcercuei | 0:03b5121a232e | 484 | * Everything is available on the context, so this is useless in our case. |
| pcercuei | 0:03b5121a232e | 485 | */ |
| pcercuei | 0:03b5121a232e | 486 | typedef void (*setDocumentLocatorSAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 487 | xmlSAXLocatorPtr loc); |
| pcercuei | 0:03b5121a232e | 488 | /** |
| pcercuei | 0:03b5121a232e | 489 | * startDocumentSAXFunc: |
| pcercuei | 0:03b5121a232e | 490 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 491 | * |
| pcercuei | 0:03b5121a232e | 492 | * Called when the document start being processed. |
| pcercuei | 0:03b5121a232e | 493 | */ |
| pcercuei | 0:03b5121a232e | 494 | typedef void (*startDocumentSAXFunc) (void *ctx); |
| pcercuei | 0:03b5121a232e | 495 | /** |
| pcercuei | 0:03b5121a232e | 496 | * endDocumentSAXFunc: |
| pcercuei | 0:03b5121a232e | 497 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 498 | * |
| pcercuei | 0:03b5121a232e | 499 | * Called when the document end has been detected. |
| pcercuei | 0:03b5121a232e | 500 | */ |
| pcercuei | 0:03b5121a232e | 501 | typedef void (*endDocumentSAXFunc) (void *ctx); |
| pcercuei | 0:03b5121a232e | 502 | /** |
| pcercuei | 0:03b5121a232e | 503 | * startElementSAXFunc: |
| pcercuei | 0:03b5121a232e | 504 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 505 | * @name: The element name, including namespace prefix |
| pcercuei | 0:03b5121a232e | 506 | * @atts: An array of name/value attributes pairs, NULL terminated |
| pcercuei | 0:03b5121a232e | 507 | * |
| pcercuei | 0:03b5121a232e | 508 | * Called when an opening tag has been processed. |
| pcercuei | 0:03b5121a232e | 509 | */ |
| pcercuei | 0:03b5121a232e | 510 | typedef void (*startElementSAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 511 | const xmlChar *name, |
| pcercuei | 0:03b5121a232e | 512 | const xmlChar **atts); |
| pcercuei | 0:03b5121a232e | 513 | /** |
| pcercuei | 0:03b5121a232e | 514 | * endElementSAXFunc: |
| pcercuei | 0:03b5121a232e | 515 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 516 | * @name: The element name |
| pcercuei | 0:03b5121a232e | 517 | * |
| pcercuei | 0:03b5121a232e | 518 | * Called when the end of an element has been detected. |
| pcercuei | 0:03b5121a232e | 519 | */ |
| pcercuei | 0:03b5121a232e | 520 | typedef void (*endElementSAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 521 | const xmlChar *name); |
| pcercuei | 0:03b5121a232e | 522 | /** |
| pcercuei | 0:03b5121a232e | 523 | * attributeSAXFunc: |
| pcercuei | 0:03b5121a232e | 524 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 525 | * @name: The attribute name, including namespace prefix |
| pcercuei | 0:03b5121a232e | 526 | * @value: The attribute value |
| pcercuei | 0:03b5121a232e | 527 | * |
| pcercuei | 0:03b5121a232e | 528 | * Handle an attribute that has been read by the parser. |
| pcercuei | 0:03b5121a232e | 529 | * The default handling is to convert the attribute into an |
| pcercuei | 0:03b5121a232e | 530 | * DOM subtree and past it in a new xmlAttr element added to |
| pcercuei | 0:03b5121a232e | 531 | * the element. |
| pcercuei | 0:03b5121a232e | 532 | */ |
| pcercuei | 0:03b5121a232e | 533 | typedef void (*attributeSAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 534 | const xmlChar *name, |
| pcercuei | 0:03b5121a232e | 535 | const xmlChar *value); |
| pcercuei | 0:03b5121a232e | 536 | /** |
| pcercuei | 0:03b5121a232e | 537 | * referenceSAXFunc: |
| pcercuei | 0:03b5121a232e | 538 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 539 | * @name: The entity name |
| pcercuei | 0:03b5121a232e | 540 | * |
| pcercuei | 0:03b5121a232e | 541 | * Called when an entity reference is detected. |
| pcercuei | 0:03b5121a232e | 542 | */ |
| pcercuei | 0:03b5121a232e | 543 | typedef void (*referenceSAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 544 | const xmlChar *name); |
| pcercuei | 0:03b5121a232e | 545 | /** |
| pcercuei | 0:03b5121a232e | 546 | * charactersSAXFunc: |
| pcercuei | 0:03b5121a232e | 547 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 548 | * @ch: a xmlChar string |
| pcercuei | 0:03b5121a232e | 549 | * @len: the number of xmlChar |
| pcercuei | 0:03b5121a232e | 550 | * |
| pcercuei | 0:03b5121a232e | 551 | * Receiving some chars from the parser. |
| pcercuei | 0:03b5121a232e | 552 | */ |
| pcercuei | 0:03b5121a232e | 553 | typedef void (*charactersSAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 554 | const xmlChar *ch, |
| pcercuei | 0:03b5121a232e | 555 | int len); |
| pcercuei | 0:03b5121a232e | 556 | /** |
| pcercuei | 0:03b5121a232e | 557 | * ignorableWhitespaceSAXFunc: |
| pcercuei | 0:03b5121a232e | 558 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 559 | * @ch: a xmlChar string |
| pcercuei | 0:03b5121a232e | 560 | * @len: the number of xmlChar |
| pcercuei | 0:03b5121a232e | 561 | * |
| pcercuei | 0:03b5121a232e | 562 | * Receiving some ignorable whitespaces from the parser. |
| pcercuei | 0:03b5121a232e | 563 | * UNUSED: by default the DOM building will use characters. |
| pcercuei | 0:03b5121a232e | 564 | */ |
| pcercuei | 0:03b5121a232e | 565 | typedef void (*ignorableWhitespaceSAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 566 | const xmlChar *ch, |
| pcercuei | 0:03b5121a232e | 567 | int len); |
| pcercuei | 0:03b5121a232e | 568 | /** |
| pcercuei | 0:03b5121a232e | 569 | * processingInstructionSAXFunc: |
| pcercuei | 0:03b5121a232e | 570 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 571 | * @target: the target name |
| pcercuei | 0:03b5121a232e | 572 | * @data: the PI data's |
| pcercuei | 0:03b5121a232e | 573 | * |
| pcercuei | 0:03b5121a232e | 574 | * A processing instruction has been parsed. |
| pcercuei | 0:03b5121a232e | 575 | */ |
| pcercuei | 0:03b5121a232e | 576 | typedef void (*processingInstructionSAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 577 | const xmlChar *target, |
| pcercuei | 0:03b5121a232e | 578 | const xmlChar *data); |
| pcercuei | 0:03b5121a232e | 579 | /** |
| pcercuei | 0:03b5121a232e | 580 | * commentSAXFunc: |
| pcercuei | 0:03b5121a232e | 581 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 582 | * @value: the comment content |
| pcercuei | 0:03b5121a232e | 583 | * |
| pcercuei | 0:03b5121a232e | 584 | * A comment has been parsed. |
| pcercuei | 0:03b5121a232e | 585 | */ |
| pcercuei | 0:03b5121a232e | 586 | typedef void (*commentSAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 587 | const xmlChar *value); |
| pcercuei | 0:03b5121a232e | 588 | /** |
| pcercuei | 0:03b5121a232e | 589 | * cdataBlockSAXFunc: |
| pcercuei | 0:03b5121a232e | 590 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 591 | * @value: The pcdata content |
| pcercuei | 0:03b5121a232e | 592 | * @len: the block length |
| pcercuei | 0:03b5121a232e | 593 | * |
| pcercuei | 0:03b5121a232e | 594 | * Called when a pcdata block has been parsed. |
| pcercuei | 0:03b5121a232e | 595 | */ |
| pcercuei | 0:03b5121a232e | 596 | typedef void (*cdataBlockSAXFunc) ( |
| pcercuei | 0:03b5121a232e | 597 | void *ctx, |
| pcercuei | 0:03b5121a232e | 598 | const xmlChar *value, |
| pcercuei | 0:03b5121a232e | 599 | int len); |
| pcercuei | 0:03b5121a232e | 600 | /** |
| pcercuei | 0:03b5121a232e | 601 | * warningSAXFunc: |
| pcercuei | 0:03b5121a232e | 602 | * @ctx: an XML parser context |
| pcercuei | 0:03b5121a232e | 603 | * @msg: the message to display/transmit |
| pcercuei | 0:03b5121a232e | 604 | * @...: extra parameters for the message display |
| pcercuei | 0:03b5121a232e | 605 | * |
| pcercuei | 0:03b5121a232e | 606 | * Display and format a warning messages, callback. |
| pcercuei | 0:03b5121a232e | 607 | */ |
| pcercuei | 0:03b5121a232e | 608 | typedef void (XMLCDECL *warningSAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 609 | const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); |
| pcercuei | 0:03b5121a232e | 610 | /** |
| pcercuei | 0:03b5121a232e | 611 | * errorSAXFunc: |
| pcercuei | 0:03b5121a232e | 612 | * @ctx: an XML parser context |
| pcercuei | 0:03b5121a232e | 613 | * @msg: the message to display/transmit |
| pcercuei | 0:03b5121a232e | 614 | * @...: extra parameters for the message display |
| pcercuei | 0:03b5121a232e | 615 | * |
| pcercuei | 0:03b5121a232e | 616 | * Display and format an error messages, callback. |
| pcercuei | 0:03b5121a232e | 617 | */ |
| pcercuei | 0:03b5121a232e | 618 | typedef void (XMLCDECL *errorSAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 619 | const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); |
| pcercuei | 0:03b5121a232e | 620 | /** |
| pcercuei | 0:03b5121a232e | 621 | * fatalErrorSAXFunc: |
| pcercuei | 0:03b5121a232e | 622 | * @ctx: an XML parser context |
| pcercuei | 0:03b5121a232e | 623 | * @msg: the message to display/transmit |
| pcercuei | 0:03b5121a232e | 624 | * @...: extra parameters for the message display |
| pcercuei | 0:03b5121a232e | 625 | * |
| pcercuei | 0:03b5121a232e | 626 | * Display and format fatal error messages, callback. |
| pcercuei | 0:03b5121a232e | 627 | * Note: so far fatalError() SAX callbacks are not used, error() |
| pcercuei | 0:03b5121a232e | 628 | * get all the callbacks for errors. |
| pcercuei | 0:03b5121a232e | 629 | */ |
| pcercuei | 0:03b5121a232e | 630 | typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx, |
| pcercuei | 0:03b5121a232e | 631 | const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); |
| pcercuei | 0:03b5121a232e | 632 | /** |
| pcercuei | 0:03b5121a232e | 633 | * isStandaloneSAXFunc: |
| pcercuei | 0:03b5121a232e | 634 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 635 | * |
| pcercuei | 0:03b5121a232e | 636 | * Is this document tagged standalone? |
| pcercuei | 0:03b5121a232e | 637 | * |
| pcercuei | 0:03b5121a232e | 638 | * Returns 1 if true |
| pcercuei | 0:03b5121a232e | 639 | */ |
| pcercuei | 0:03b5121a232e | 640 | typedef int (*isStandaloneSAXFunc) (void *ctx); |
| pcercuei | 0:03b5121a232e | 641 | /** |
| pcercuei | 0:03b5121a232e | 642 | * hasInternalSubsetSAXFunc: |
| pcercuei | 0:03b5121a232e | 643 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 644 | * |
| pcercuei | 0:03b5121a232e | 645 | * Does this document has an internal subset. |
| pcercuei | 0:03b5121a232e | 646 | * |
| pcercuei | 0:03b5121a232e | 647 | * Returns 1 if true |
| pcercuei | 0:03b5121a232e | 648 | */ |
| pcercuei | 0:03b5121a232e | 649 | typedef int (*hasInternalSubsetSAXFunc) (void *ctx); |
| pcercuei | 0:03b5121a232e | 650 | |
| pcercuei | 0:03b5121a232e | 651 | /** |
| pcercuei | 0:03b5121a232e | 652 | * hasExternalSubsetSAXFunc: |
| pcercuei | 0:03b5121a232e | 653 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 654 | * |
| pcercuei | 0:03b5121a232e | 655 | * Does this document has an external subset? |
| pcercuei | 0:03b5121a232e | 656 | * |
| pcercuei | 0:03b5121a232e | 657 | * Returns 1 if true |
| pcercuei | 0:03b5121a232e | 658 | */ |
| pcercuei | 0:03b5121a232e | 659 | typedef int (*hasExternalSubsetSAXFunc) (void *ctx); |
| pcercuei | 0:03b5121a232e | 660 | |
| pcercuei | 0:03b5121a232e | 661 | /************************************************************************ |
| pcercuei | 0:03b5121a232e | 662 | * * |
| pcercuei | 0:03b5121a232e | 663 | * The SAX version 2 API extensions * |
| pcercuei | 0:03b5121a232e | 664 | * * |
| pcercuei | 0:03b5121a232e | 665 | ************************************************************************/ |
| pcercuei | 0:03b5121a232e | 666 | /** |
| pcercuei | 0:03b5121a232e | 667 | * XML_SAX2_MAGIC: |
| pcercuei | 0:03b5121a232e | 668 | * |
| pcercuei | 0:03b5121a232e | 669 | * Special constant found in SAX2 blocks initialized fields |
| pcercuei | 0:03b5121a232e | 670 | */ |
| pcercuei | 0:03b5121a232e | 671 | #define XML_SAX2_MAGIC 0xDEEDBEAF |
| pcercuei | 0:03b5121a232e | 672 | |
| pcercuei | 0:03b5121a232e | 673 | /** |
| pcercuei | 0:03b5121a232e | 674 | * startElementNsSAX2Func: |
| pcercuei | 0:03b5121a232e | 675 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 676 | * @localname: the local name of the element |
| pcercuei | 0:03b5121a232e | 677 | * @prefix: the element namespace prefix if available |
| pcercuei | 0:03b5121a232e | 678 | * @URI: the element namespace name if available |
| pcercuei | 0:03b5121a232e | 679 | * @nb_namespaces: number of namespace definitions on that node |
| pcercuei | 0:03b5121a232e | 680 | * @namespaces: pointer to the array of prefix/URI pairs namespace definitions |
| pcercuei | 0:03b5121a232e | 681 | * @nb_attributes: the number of attributes on that node |
| pcercuei | 0:03b5121a232e | 682 | * @nb_defaulted: the number of defaulted attributes. The defaulted |
| pcercuei | 0:03b5121a232e | 683 | * ones are at the end of the array |
| pcercuei | 0:03b5121a232e | 684 | * @attributes: pointer to the array of (localname/prefix/URI/value/end) |
| pcercuei | 0:03b5121a232e | 685 | * attribute values. |
| pcercuei | 0:03b5121a232e | 686 | * |
| pcercuei | 0:03b5121a232e | 687 | * SAX2 callback when an element start has been detected by the parser. |
| pcercuei | 0:03b5121a232e | 688 | * It provides the namespace informations for the element, as well as |
| pcercuei | 0:03b5121a232e | 689 | * the new namespace declarations on the element. |
| pcercuei | 0:03b5121a232e | 690 | */ |
| pcercuei | 0:03b5121a232e | 691 | |
| pcercuei | 0:03b5121a232e | 692 | typedef void (*startElementNsSAX2Func) (void *ctx, |
| pcercuei | 0:03b5121a232e | 693 | const xmlChar *localname, |
| pcercuei | 0:03b5121a232e | 694 | const xmlChar *prefix, |
| pcercuei | 0:03b5121a232e | 695 | const xmlChar *URI, |
| pcercuei | 0:03b5121a232e | 696 | int nb_namespaces, |
| pcercuei | 0:03b5121a232e | 697 | const xmlChar **namespaces, |
| pcercuei | 0:03b5121a232e | 698 | int nb_attributes, |
| pcercuei | 0:03b5121a232e | 699 | int nb_defaulted, |
| pcercuei | 0:03b5121a232e | 700 | const xmlChar **attributes); |
| pcercuei | 0:03b5121a232e | 701 | |
| pcercuei | 0:03b5121a232e | 702 | /** |
| pcercuei | 0:03b5121a232e | 703 | * endElementNsSAX2Func: |
| pcercuei | 0:03b5121a232e | 704 | * @ctx: the user data (XML parser context) |
| pcercuei | 0:03b5121a232e | 705 | * @localname: the local name of the element |
| pcercuei | 0:03b5121a232e | 706 | * @prefix: the element namespace prefix if available |
| pcercuei | 0:03b5121a232e | 707 | * @URI: the element namespace name if available |
| pcercuei | 0:03b5121a232e | 708 | * |
| pcercuei | 0:03b5121a232e | 709 | * SAX2 callback when an element end has been detected by the parser. |
| pcercuei | 0:03b5121a232e | 710 | * It provides the namespace informations for the element. |
| pcercuei | 0:03b5121a232e | 711 | */ |
| pcercuei | 0:03b5121a232e | 712 | |
| pcercuei | 0:03b5121a232e | 713 | typedef void (*endElementNsSAX2Func) (void *ctx, |
| pcercuei | 0:03b5121a232e | 714 | const xmlChar *localname, |
| pcercuei | 0:03b5121a232e | 715 | const xmlChar *prefix, |
| pcercuei | 0:03b5121a232e | 716 | const xmlChar *URI); |
| pcercuei | 0:03b5121a232e | 717 | |
| pcercuei | 0:03b5121a232e | 718 | |
| pcercuei | 0:03b5121a232e | 719 | struct _xmlSAXHandler { |
| pcercuei | 0:03b5121a232e | 720 | internalSubsetSAXFunc internalSubset; |
| pcercuei | 0:03b5121a232e | 721 | isStandaloneSAXFunc isStandalone; |
| pcercuei | 0:03b5121a232e | 722 | hasInternalSubsetSAXFunc hasInternalSubset; |
| pcercuei | 0:03b5121a232e | 723 | hasExternalSubsetSAXFunc hasExternalSubset; |
| pcercuei | 0:03b5121a232e | 724 | resolveEntitySAXFunc resolveEntity; |
| pcercuei | 0:03b5121a232e | 725 | getEntitySAXFunc getEntity; |
| pcercuei | 0:03b5121a232e | 726 | entityDeclSAXFunc entityDecl; |
| pcercuei | 0:03b5121a232e | 727 | notationDeclSAXFunc notationDecl; |
| pcercuei | 0:03b5121a232e | 728 | attributeDeclSAXFunc attributeDecl; |
| pcercuei | 0:03b5121a232e | 729 | elementDeclSAXFunc elementDecl; |
| pcercuei | 0:03b5121a232e | 730 | unparsedEntityDeclSAXFunc unparsedEntityDecl; |
| pcercuei | 0:03b5121a232e | 731 | setDocumentLocatorSAXFunc setDocumentLocator; |
| pcercuei | 0:03b5121a232e | 732 | startDocumentSAXFunc startDocument; |
| pcercuei | 0:03b5121a232e | 733 | endDocumentSAXFunc endDocument; |
| pcercuei | 0:03b5121a232e | 734 | startElementSAXFunc startElement; |
| pcercuei | 0:03b5121a232e | 735 | endElementSAXFunc endElement; |
| pcercuei | 0:03b5121a232e | 736 | referenceSAXFunc reference; |
| pcercuei | 0:03b5121a232e | 737 | charactersSAXFunc characters; |
| pcercuei | 0:03b5121a232e | 738 | ignorableWhitespaceSAXFunc ignorableWhitespace; |
| pcercuei | 0:03b5121a232e | 739 | processingInstructionSAXFunc processingInstruction; |
| pcercuei | 0:03b5121a232e | 740 | commentSAXFunc comment; |
| pcercuei | 0:03b5121a232e | 741 | warningSAXFunc warning; |
| pcercuei | 0:03b5121a232e | 742 | errorSAXFunc error; |
| pcercuei | 0:03b5121a232e | 743 | fatalErrorSAXFunc fatalError; /* unused error() get all the errors */ |
| pcercuei | 0:03b5121a232e | 744 | getParameterEntitySAXFunc getParameterEntity; |
| pcercuei | 0:03b5121a232e | 745 | cdataBlockSAXFunc cdataBlock; |
| pcercuei | 0:03b5121a232e | 746 | externalSubsetSAXFunc externalSubset; |
| pcercuei | 0:03b5121a232e | 747 | unsigned int initialized; |
| pcercuei | 0:03b5121a232e | 748 | /* The following fields are extensions available only on version 2 */ |
| pcercuei | 0:03b5121a232e | 749 | void *_private; |
| pcercuei | 0:03b5121a232e | 750 | startElementNsSAX2Func startElementNs; |
| pcercuei | 0:03b5121a232e | 751 | endElementNsSAX2Func endElementNs; |
| pcercuei | 0:03b5121a232e | 752 | xmlStructuredErrorFunc serror; |
| pcercuei | 0:03b5121a232e | 753 | }; |
| pcercuei | 0:03b5121a232e | 754 | |
| pcercuei | 0:03b5121a232e | 755 | /* |
| pcercuei | 0:03b5121a232e | 756 | * SAX Version 1 |
| pcercuei | 0:03b5121a232e | 757 | */ |
| pcercuei | 0:03b5121a232e | 758 | typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1; |
| pcercuei | 0:03b5121a232e | 759 | typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr; |
| pcercuei | 0:03b5121a232e | 760 | struct _xmlSAXHandlerV1 { |
| pcercuei | 0:03b5121a232e | 761 | internalSubsetSAXFunc internalSubset; |
| pcercuei | 0:03b5121a232e | 762 | isStandaloneSAXFunc isStandalone; |
| pcercuei | 0:03b5121a232e | 763 | hasInternalSubsetSAXFunc hasInternalSubset; |
| pcercuei | 0:03b5121a232e | 764 | hasExternalSubsetSAXFunc hasExternalSubset; |
| pcercuei | 0:03b5121a232e | 765 | resolveEntitySAXFunc resolveEntity; |
| pcercuei | 0:03b5121a232e | 766 | getEntitySAXFunc getEntity; |
| pcercuei | 0:03b5121a232e | 767 | entityDeclSAXFunc entityDecl; |
| pcercuei | 0:03b5121a232e | 768 | notationDeclSAXFunc notationDecl; |
| pcercuei | 0:03b5121a232e | 769 | attributeDeclSAXFunc attributeDecl; |
| pcercuei | 0:03b5121a232e | 770 | elementDeclSAXFunc elementDecl; |
| pcercuei | 0:03b5121a232e | 771 | unparsedEntityDeclSAXFunc unparsedEntityDecl; |
| pcercuei | 0:03b5121a232e | 772 | setDocumentLocatorSAXFunc setDocumentLocator; |
| pcercuei | 0:03b5121a232e | 773 | startDocumentSAXFunc startDocument; |
| pcercuei | 0:03b5121a232e | 774 | endDocumentSAXFunc endDocument; |
| pcercuei | 0:03b5121a232e | 775 | startElementSAXFunc startElement; |
| pcercuei | 0:03b5121a232e | 776 | endElementSAXFunc endElement; |
| pcercuei | 0:03b5121a232e | 777 | referenceSAXFunc reference; |
| pcercuei | 0:03b5121a232e | 778 | charactersSAXFunc characters; |
| pcercuei | 0:03b5121a232e | 779 | ignorableWhitespaceSAXFunc ignorableWhitespace; |
| pcercuei | 0:03b5121a232e | 780 | processingInstructionSAXFunc processingInstruction; |
| pcercuei | 0:03b5121a232e | 781 | commentSAXFunc comment; |
| pcercuei | 0:03b5121a232e | 782 | warningSAXFunc warning; |
| pcercuei | 0:03b5121a232e | 783 | errorSAXFunc error; |
| pcercuei | 0:03b5121a232e | 784 | fatalErrorSAXFunc fatalError; /* unused error() get all the errors */ |
| pcercuei | 0:03b5121a232e | 785 | getParameterEntitySAXFunc getParameterEntity; |
| pcercuei | 0:03b5121a232e | 786 | cdataBlockSAXFunc cdataBlock; |
| pcercuei | 0:03b5121a232e | 787 | externalSubsetSAXFunc externalSubset; |
| pcercuei | 0:03b5121a232e | 788 | unsigned int initialized; |
| pcercuei | 0:03b5121a232e | 789 | }; |
| pcercuei | 0:03b5121a232e | 790 | |
| pcercuei | 0:03b5121a232e | 791 | |
| pcercuei | 0:03b5121a232e | 792 | /** |
| pcercuei | 0:03b5121a232e | 793 | * xmlExternalEntityLoader: |
| pcercuei | 0:03b5121a232e | 794 | * @URL: The System ID of the resource requested |
| pcercuei | 0:03b5121a232e | 795 | * @ID: The Public ID of the resource requested |
| pcercuei | 0:03b5121a232e | 796 | * @context: the XML parser context |
| pcercuei | 0:03b5121a232e | 797 | * |
| pcercuei | 0:03b5121a232e | 798 | * External entity loaders types. |
| pcercuei | 0:03b5121a232e | 799 | * |
| pcercuei | 0:03b5121a232e | 800 | * Returns the entity input parser. |
| pcercuei | 0:03b5121a232e | 801 | */ |
| pcercuei | 0:03b5121a232e | 802 | typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL, |
| pcercuei | 0:03b5121a232e | 803 | const char *ID, |
| pcercuei | 0:03b5121a232e | 804 | xmlParserCtxtPtr context); |
| pcercuei | 0:03b5121a232e | 805 | |
| pcercuei | 0:03b5121a232e | 806 | #ifdef __cplusplus |
| pcercuei | 0:03b5121a232e | 807 | } |
| pcercuei | 0:03b5121a232e | 808 | #endif |
| pcercuei | 0:03b5121a232e | 809 | |
| pcercuei | 0:03b5121a232e | 810 | #include <libxml/encoding.h> |
| pcercuei | 0:03b5121a232e | 811 | #include <libxml/xmlIO.h> |
| pcercuei | 0:03b5121a232e | 812 | #include <libxml/globals.h> |
| pcercuei | 0:03b5121a232e | 813 | |
| pcercuei | 0:03b5121a232e | 814 | #ifdef __cplusplus |
| pcercuei | 0:03b5121a232e | 815 | extern "C" { |
| pcercuei | 0:03b5121a232e | 816 | #endif |
| pcercuei | 0:03b5121a232e | 817 | |
| pcercuei | 0:03b5121a232e | 818 | |
| pcercuei | 0:03b5121a232e | 819 | /* |
| pcercuei | 0:03b5121a232e | 820 | * Init/Cleanup |
| pcercuei | 0:03b5121a232e | 821 | */ |
| pcercuei | 0:03b5121a232e | 822 | XMLPUBFUN void XMLCALL |
| pcercuei | 0:03b5121a232e | 823 | xmlInitParser (void); |
| pcercuei | 0:03b5121a232e | 824 | XMLPUBFUN void XMLCALL |
| pcercuei | 0:03b5121a232e | 825 | xmlCleanupParser (void); |
| pcercuei | 0:03b5121a232e | 826 | |
| pcercuei | 0:03b5121a232e | 827 | /* |
| pcercuei | 0:03b5121a232e | 828 | * Input functions |
| pcercuei | 0:03b5121a232e | 829 | */ |
| pcercuei | 0:03b5121a232e | 830 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 831 | xmlParserInputRead (xmlParserInputPtr in, |
| pcercuei | 0:03b5121a232e | 832 | int len); |
| pcercuei | 0:03b5121a232e | 833 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 834 | xmlParserInputGrow (xmlParserInputPtr in, |
| pcercuei | 0:03b5121a232e | 835 | int len); |
| pcercuei | 0:03b5121a232e | 836 | |
| pcercuei | 0:03b5121a232e | 837 | /* |
| pcercuei | 0:03b5121a232e | 838 | * Basic parsing Interfaces |
| pcercuei | 0:03b5121a232e | 839 | */ |
| pcercuei | 0:03b5121a232e | 840 | #ifdef LIBXML_SAX1_ENABLED |
| pcercuei | 0:03b5121a232e | 841 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 842 | xmlParseDoc (const xmlChar *cur); |
| pcercuei | 0:03b5121a232e | 843 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 844 | xmlParseFile (const char *filename); |
| pcercuei | 0:03b5121a232e | 845 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 846 | xmlParseMemory (const char *buffer, |
| pcercuei | 0:03b5121a232e | 847 | int size); |
| pcercuei | 0:03b5121a232e | 848 | #endif /* LIBXML_SAX1_ENABLED */ |
| pcercuei | 0:03b5121a232e | 849 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 850 | xmlSubstituteEntitiesDefault(int val); |
| pcercuei | 0:03b5121a232e | 851 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 852 | xmlKeepBlanksDefault (int val); |
| pcercuei | 0:03b5121a232e | 853 | XMLPUBFUN void XMLCALL |
| pcercuei | 0:03b5121a232e | 854 | xmlStopParser (xmlParserCtxtPtr ctxt); |
| pcercuei | 0:03b5121a232e | 855 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 856 | xmlPedanticParserDefault(int val); |
| pcercuei | 0:03b5121a232e | 857 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 858 | xmlLineNumbersDefault (int val); |
| pcercuei | 0:03b5121a232e | 859 | |
| pcercuei | 0:03b5121a232e | 860 | #ifdef LIBXML_SAX1_ENABLED |
| pcercuei | 0:03b5121a232e | 861 | /* |
| pcercuei | 0:03b5121a232e | 862 | * Recovery mode |
| pcercuei | 0:03b5121a232e | 863 | */ |
| pcercuei | 0:03b5121a232e | 864 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 865 | xmlRecoverDoc (const xmlChar *cur); |
| pcercuei | 0:03b5121a232e | 866 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 867 | xmlRecoverMemory (const char *buffer, |
| pcercuei | 0:03b5121a232e | 868 | int size); |
| pcercuei | 0:03b5121a232e | 869 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 870 | xmlRecoverFile (const char *filename); |
| pcercuei | 0:03b5121a232e | 871 | #endif /* LIBXML_SAX1_ENABLED */ |
| pcercuei | 0:03b5121a232e | 872 | |
| pcercuei | 0:03b5121a232e | 873 | /* |
| pcercuei | 0:03b5121a232e | 874 | * Less common routines and SAX interfaces |
| pcercuei | 0:03b5121a232e | 875 | */ |
| pcercuei | 0:03b5121a232e | 876 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 877 | xmlParseDocument (xmlParserCtxtPtr ctxt); |
| pcercuei | 0:03b5121a232e | 878 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 879 | xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt); |
| pcercuei | 0:03b5121a232e | 880 | #ifdef LIBXML_SAX1_ENABLED |
| pcercuei | 0:03b5121a232e | 881 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 882 | xmlSAXUserParseFile (xmlSAXHandlerPtr sax, |
| pcercuei | 0:03b5121a232e | 883 | void *user_data, |
| pcercuei | 0:03b5121a232e | 884 | const char *filename); |
| pcercuei | 0:03b5121a232e | 885 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 886 | xmlSAXUserParseMemory (xmlSAXHandlerPtr sax, |
| pcercuei | 0:03b5121a232e | 887 | void *user_data, |
| pcercuei | 0:03b5121a232e | 888 | const char *buffer, |
| pcercuei | 0:03b5121a232e | 889 | int size); |
| pcercuei | 0:03b5121a232e | 890 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 891 | xmlSAXParseDoc (xmlSAXHandlerPtr sax, |
| pcercuei | 0:03b5121a232e | 892 | const xmlChar *cur, |
| pcercuei | 0:03b5121a232e | 893 | int recovery); |
| pcercuei | 0:03b5121a232e | 894 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 895 | xmlSAXParseMemory (xmlSAXHandlerPtr sax, |
| pcercuei | 0:03b5121a232e | 896 | const char *buffer, |
| pcercuei | 0:03b5121a232e | 897 | int size, |
| pcercuei | 0:03b5121a232e | 898 | int recovery); |
| pcercuei | 0:03b5121a232e | 899 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 900 | xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax, |
| pcercuei | 0:03b5121a232e | 901 | const char *buffer, |
| pcercuei | 0:03b5121a232e | 902 | int size, |
| pcercuei | 0:03b5121a232e | 903 | int recovery, |
| pcercuei | 0:03b5121a232e | 904 | void *data); |
| pcercuei | 0:03b5121a232e | 905 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 906 | xmlSAXParseFile (xmlSAXHandlerPtr sax, |
| pcercuei | 0:03b5121a232e | 907 | const char *filename, |
| pcercuei | 0:03b5121a232e | 908 | int recovery); |
| pcercuei | 0:03b5121a232e | 909 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 910 | xmlSAXParseFileWithData (xmlSAXHandlerPtr sax, |
| pcercuei | 0:03b5121a232e | 911 | const char *filename, |
| pcercuei | 0:03b5121a232e | 912 | int recovery, |
| pcercuei | 0:03b5121a232e | 913 | void *data); |
| pcercuei | 0:03b5121a232e | 914 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 915 | xmlSAXParseEntity (xmlSAXHandlerPtr sax, |
| pcercuei | 0:03b5121a232e | 916 | const char *filename); |
| pcercuei | 0:03b5121a232e | 917 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 918 | xmlParseEntity (const char *filename); |
| pcercuei | 0:03b5121a232e | 919 | #endif /* LIBXML_SAX1_ENABLED */ |
| pcercuei | 0:03b5121a232e | 920 | |
| pcercuei | 0:03b5121a232e | 921 | #ifdef LIBXML_VALID_ENABLED |
| pcercuei | 0:03b5121a232e | 922 | XMLPUBFUN xmlDtdPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 923 | xmlSAXParseDTD (xmlSAXHandlerPtr sax, |
| pcercuei | 0:03b5121a232e | 924 | const xmlChar *ExternalID, |
| pcercuei | 0:03b5121a232e | 925 | const xmlChar *SystemID); |
| pcercuei | 0:03b5121a232e | 926 | XMLPUBFUN xmlDtdPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 927 | xmlParseDTD (const xmlChar *ExternalID, |
| pcercuei | 0:03b5121a232e | 928 | const xmlChar *SystemID); |
| pcercuei | 0:03b5121a232e | 929 | XMLPUBFUN xmlDtdPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 930 | xmlIOParseDTD (xmlSAXHandlerPtr sax, |
| pcercuei | 0:03b5121a232e | 931 | xmlParserInputBufferPtr input, |
| pcercuei | 0:03b5121a232e | 932 | xmlCharEncoding enc); |
| pcercuei | 0:03b5121a232e | 933 | #endif /* LIBXML_VALID_ENABLE */ |
| pcercuei | 0:03b5121a232e | 934 | #ifdef LIBXML_SAX1_ENABLED |
| pcercuei | 0:03b5121a232e | 935 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 936 | xmlParseBalancedChunkMemory(xmlDocPtr doc, |
| pcercuei | 0:03b5121a232e | 937 | xmlSAXHandlerPtr sax, |
| pcercuei | 0:03b5121a232e | 938 | void *user_data, |
| pcercuei | 0:03b5121a232e | 939 | int depth, |
| pcercuei | 0:03b5121a232e | 940 | const xmlChar *string, |
| pcercuei | 0:03b5121a232e | 941 | xmlNodePtr *lst); |
| pcercuei | 0:03b5121a232e | 942 | #endif /* LIBXML_SAX1_ENABLED */ |
| pcercuei | 0:03b5121a232e | 943 | XMLPUBFUN xmlParserErrors XMLCALL |
| pcercuei | 0:03b5121a232e | 944 | xmlParseInNodeContext (xmlNodePtr node, |
| pcercuei | 0:03b5121a232e | 945 | const char *data, |
| pcercuei | 0:03b5121a232e | 946 | int datalen, |
| pcercuei | 0:03b5121a232e | 947 | int options, |
| pcercuei | 0:03b5121a232e | 948 | xmlNodePtr *lst); |
| pcercuei | 0:03b5121a232e | 949 | #ifdef LIBXML_SAX1_ENABLED |
| pcercuei | 0:03b5121a232e | 950 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 951 | xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc, |
| pcercuei | 0:03b5121a232e | 952 | xmlSAXHandlerPtr sax, |
| pcercuei | 0:03b5121a232e | 953 | void *user_data, |
| pcercuei | 0:03b5121a232e | 954 | int depth, |
| pcercuei | 0:03b5121a232e | 955 | const xmlChar *string, |
| pcercuei | 0:03b5121a232e | 956 | xmlNodePtr *lst, |
| pcercuei | 0:03b5121a232e | 957 | int recover); |
| pcercuei | 0:03b5121a232e | 958 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 959 | xmlParseExternalEntity (xmlDocPtr doc, |
| pcercuei | 0:03b5121a232e | 960 | xmlSAXHandlerPtr sax, |
| pcercuei | 0:03b5121a232e | 961 | void *user_data, |
| pcercuei | 0:03b5121a232e | 962 | int depth, |
| pcercuei | 0:03b5121a232e | 963 | const xmlChar *URL, |
| pcercuei | 0:03b5121a232e | 964 | const xmlChar *ID, |
| pcercuei | 0:03b5121a232e | 965 | xmlNodePtr *lst); |
| pcercuei | 0:03b5121a232e | 966 | #endif /* LIBXML_SAX1_ENABLED */ |
| pcercuei | 0:03b5121a232e | 967 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 968 | xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, |
| pcercuei | 0:03b5121a232e | 969 | const xmlChar *URL, |
| pcercuei | 0:03b5121a232e | 970 | const xmlChar *ID, |
| pcercuei | 0:03b5121a232e | 971 | xmlNodePtr *lst); |
| pcercuei | 0:03b5121a232e | 972 | |
| pcercuei | 0:03b5121a232e | 973 | /* |
| pcercuei | 0:03b5121a232e | 974 | * Parser contexts handling. |
| pcercuei | 0:03b5121a232e | 975 | */ |
| pcercuei | 0:03b5121a232e | 976 | XMLPUBFUN xmlParserCtxtPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 977 | xmlNewParserCtxt (void); |
| pcercuei | 0:03b5121a232e | 978 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 979 | xmlInitParserCtxt (xmlParserCtxtPtr ctxt); |
| pcercuei | 0:03b5121a232e | 980 | XMLPUBFUN void XMLCALL |
| pcercuei | 0:03b5121a232e | 981 | xmlClearParserCtxt (xmlParserCtxtPtr ctxt); |
| pcercuei | 0:03b5121a232e | 982 | XMLPUBFUN void XMLCALL |
| pcercuei | 0:03b5121a232e | 983 | xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); |
| pcercuei | 0:03b5121a232e | 984 | #ifdef LIBXML_SAX1_ENABLED |
| pcercuei | 0:03b5121a232e | 985 | XMLPUBFUN void XMLCALL |
| pcercuei | 0:03b5121a232e | 986 | xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt, |
| pcercuei | 0:03b5121a232e | 987 | const xmlChar* buffer, |
| pcercuei | 0:03b5121a232e | 988 | const char *filename); |
| pcercuei | 0:03b5121a232e | 989 | #endif /* LIBXML_SAX1_ENABLED */ |
| pcercuei | 0:03b5121a232e | 990 | XMLPUBFUN xmlParserCtxtPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 991 | xmlCreateDocParserCtxt (const xmlChar *cur); |
| pcercuei | 0:03b5121a232e | 992 | |
| pcercuei | 0:03b5121a232e | 993 | #ifdef LIBXML_LEGACY_ENABLED |
| pcercuei | 0:03b5121a232e | 994 | /* |
| pcercuei | 0:03b5121a232e | 995 | * Reading/setting optional parsing features. |
| pcercuei | 0:03b5121a232e | 996 | */ |
| pcercuei | 0:03b5121a232e | 997 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 998 | xmlGetFeaturesList (int *len, |
| pcercuei | 0:03b5121a232e | 999 | const char **result); |
| pcercuei | 0:03b5121a232e | 1000 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 1001 | xmlGetFeature (xmlParserCtxtPtr ctxt, |
| pcercuei | 0:03b5121a232e | 1002 | const char *name, |
| pcercuei | 0:03b5121a232e | 1003 | void *result); |
| pcercuei | 0:03b5121a232e | 1004 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 1005 | xmlSetFeature (xmlParserCtxtPtr ctxt, |
| pcercuei | 0:03b5121a232e | 1006 | const char *name, |
| pcercuei | 0:03b5121a232e | 1007 | void *value); |
| pcercuei | 0:03b5121a232e | 1008 | #endif /* LIBXML_LEGACY_ENABLED */ |
| pcercuei | 0:03b5121a232e | 1009 | |
| pcercuei | 0:03b5121a232e | 1010 | #ifdef LIBXML_PUSH_ENABLED |
| pcercuei | 0:03b5121a232e | 1011 | /* |
| pcercuei | 0:03b5121a232e | 1012 | * Interfaces for the Push mode. |
| pcercuei | 0:03b5121a232e | 1013 | */ |
| pcercuei | 0:03b5121a232e | 1014 | XMLPUBFUN xmlParserCtxtPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 1015 | xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, |
| pcercuei | 0:03b5121a232e | 1016 | void *user_data, |
| pcercuei | 0:03b5121a232e | 1017 | const char *chunk, |
| pcercuei | 0:03b5121a232e | 1018 | int size, |
| pcercuei | 0:03b5121a232e | 1019 | const char *filename); |
| pcercuei | 0:03b5121a232e | 1020 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 1021 | xmlParseChunk (xmlParserCtxtPtr ctxt, |
| pcercuei | 0:03b5121a232e | 1022 | const char *chunk, |
| pcercuei | 0:03b5121a232e | 1023 | int size, |
| pcercuei | 0:03b5121a232e | 1024 | int terminate); |
| pcercuei | 0:03b5121a232e | 1025 | #endif /* LIBXML_PUSH_ENABLED */ |
| pcercuei | 0:03b5121a232e | 1026 | |
| pcercuei | 0:03b5121a232e | 1027 | /* |
| pcercuei | 0:03b5121a232e | 1028 | * Special I/O mode. |
| pcercuei | 0:03b5121a232e | 1029 | */ |
| pcercuei | 0:03b5121a232e | 1030 | |
| pcercuei | 0:03b5121a232e | 1031 | XMLPUBFUN xmlParserCtxtPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 1032 | xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax, |
| pcercuei | 0:03b5121a232e | 1033 | void *user_data, |
| pcercuei | 0:03b5121a232e | 1034 | xmlInputReadCallback ioread, |
| pcercuei | 0:03b5121a232e | 1035 | xmlInputCloseCallback ioclose, |
| pcercuei | 0:03b5121a232e | 1036 | void *ioctx, |
| pcercuei | 0:03b5121a232e | 1037 | xmlCharEncoding enc); |
| pcercuei | 0:03b5121a232e | 1038 | |
| pcercuei | 0:03b5121a232e | 1039 | XMLPUBFUN xmlParserInputPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 1040 | xmlNewIOInputStream (xmlParserCtxtPtr ctxt, |
| pcercuei | 0:03b5121a232e | 1041 | xmlParserInputBufferPtr input, |
| pcercuei | 0:03b5121a232e | 1042 | xmlCharEncoding enc); |
| pcercuei | 0:03b5121a232e | 1043 | |
| pcercuei | 0:03b5121a232e | 1044 | /* |
| pcercuei | 0:03b5121a232e | 1045 | * Node infos. |
| pcercuei | 0:03b5121a232e | 1046 | */ |
| pcercuei | 0:03b5121a232e | 1047 | XMLPUBFUN const xmlParserNodeInfo* XMLCALL |
| pcercuei | 0:03b5121a232e | 1048 | xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt, |
| pcercuei | 0:03b5121a232e | 1049 | const xmlNodePtr node); |
| pcercuei | 0:03b5121a232e | 1050 | XMLPUBFUN void XMLCALL |
| pcercuei | 0:03b5121a232e | 1051 | xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq); |
| pcercuei | 0:03b5121a232e | 1052 | XMLPUBFUN void XMLCALL |
| pcercuei | 0:03b5121a232e | 1053 | xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq); |
| pcercuei | 0:03b5121a232e | 1054 | XMLPUBFUN unsigned long XMLCALL |
| pcercuei | 0:03b5121a232e | 1055 | xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq, |
| pcercuei | 0:03b5121a232e | 1056 | const xmlNodePtr node); |
| pcercuei | 0:03b5121a232e | 1057 | XMLPUBFUN void XMLCALL |
| pcercuei | 0:03b5121a232e | 1058 | xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt, |
| pcercuei | 0:03b5121a232e | 1059 | const xmlParserNodeInfoPtr info); |
| pcercuei | 0:03b5121a232e | 1060 | |
| pcercuei | 0:03b5121a232e | 1061 | /* |
| pcercuei | 0:03b5121a232e | 1062 | * External entities handling actually implemented in xmlIO. |
| pcercuei | 0:03b5121a232e | 1063 | */ |
| pcercuei | 0:03b5121a232e | 1064 | |
| pcercuei | 0:03b5121a232e | 1065 | XMLPUBFUN void XMLCALL |
| pcercuei | 0:03b5121a232e | 1066 | xmlSetExternalEntityLoader(xmlExternalEntityLoader f); |
| pcercuei | 0:03b5121a232e | 1067 | XMLPUBFUN xmlExternalEntityLoader XMLCALL |
| pcercuei | 0:03b5121a232e | 1068 | xmlGetExternalEntityLoader(void); |
| pcercuei | 0:03b5121a232e | 1069 | XMLPUBFUN xmlParserInputPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 1070 | xmlLoadExternalEntity (const char *URL, |
| pcercuei | 0:03b5121a232e | 1071 | const char *ID, |
| pcercuei | 0:03b5121a232e | 1072 | xmlParserCtxtPtr ctxt); |
| pcercuei | 0:03b5121a232e | 1073 | |
| pcercuei | 0:03b5121a232e | 1074 | /* |
| pcercuei | 0:03b5121a232e | 1075 | * Index lookup, actually implemented in the encoding module |
| pcercuei | 0:03b5121a232e | 1076 | */ |
| pcercuei | 0:03b5121a232e | 1077 | XMLPUBFUN long XMLCALL |
| pcercuei | 0:03b5121a232e | 1078 | xmlByteConsumed (xmlParserCtxtPtr ctxt); |
| pcercuei | 0:03b5121a232e | 1079 | |
| pcercuei | 0:03b5121a232e | 1080 | /* |
| pcercuei | 0:03b5121a232e | 1081 | * New set of simpler/more flexible APIs |
| pcercuei | 0:03b5121a232e | 1082 | */ |
| pcercuei | 0:03b5121a232e | 1083 | /** |
| pcercuei | 0:03b5121a232e | 1084 | * xmlParserOption: |
| pcercuei | 0:03b5121a232e | 1085 | * |
| pcercuei | 0:03b5121a232e | 1086 | * This is the set of XML parser options that can be passed down |
| pcercuei | 0:03b5121a232e | 1087 | * to the xmlReadDoc() and similar calls. |
| pcercuei | 0:03b5121a232e | 1088 | */ |
| pcercuei | 0:03b5121a232e | 1089 | typedef enum { |
| pcercuei | 0:03b5121a232e | 1090 | XML_PARSE_RECOVER = 1<<0, /* recover on errors */ |
| pcercuei | 0:03b5121a232e | 1091 | XML_PARSE_NOENT = 1<<1, /* substitute entities */ |
| pcercuei | 0:03b5121a232e | 1092 | XML_PARSE_DTDLOAD = 1<<2, /* load the external subset */ |
| pcercuei | 0:03b5121a232e | 1093 | XML_PARSE_DTDATTR = 1<<3, /* default DTD attributes */ |
| pcercuei | 0:03b5121a232e | 1094 | XML_PARSE_DTDVALID = 1<<4, /* validate with the DTD */ |
| pcercuei | 0:03b5121a232e | 1095 | XML_PARSE_NOERROR = 1<<5, /* suppress error reports */ |
| pcercuei | 0:03b5121a232e | 1096 | XML_PARSE_NOWARNING = 1<<6, /* suppress warning reports */ |
| pcercuei | 0:03b5121a232e | 1097 | XML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */ |
| pcercuei | 0:03b5121a232e | 1098 | XML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */ |
| pcercuei | 0:03b5121a232e | 1099 | XML_PARSE_SAX1 = 1<<9, /* use the SAX1 interface internally */ |
| pcercuei | 0:03b5121a232e | 1100 | XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitition */ |
| pcercuei | 0:03b5121a232e | 1101 | XML_PARSE_NONET = 1<<11,/* Forbid network access */ |
| pcercuei | 0:03b5121a232e | 1102 | XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionnary */ |
| pcercuei | 0:03b5121a232e | 1103 | XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */ |
| pcercuei | 0:03b5121a232e | 1104 | XML_PARSE_NOCDATA = 1<<14,/* merge CDATA as text nodes */ |
| pcercuei | 0:03b5121a232e | 1105 | XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */ |
| pcercuei | 0:03b5121a232e | 1106 | XML_PARSE_COMPACT = 1<<16,/* compact small text nodes; no modification of |
| pcercuei | 0:03b5121a232e | 1107 | the tree allowed afterwards (will possibly |
| pcercuei | 0:03b5121a232e | 1108 | crash if you try to modify the tree) */ |
| pcercuei | 0:03b5121a232e | 1109 | XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */ |
| pcercuei | 0:03b5121a232e | 1110 | XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */ |
| pcercuei | 0:03b5121a232e | 1111 | XML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */ |
| pcercuei | 0:03b5121a232e | 1112 | XML_PARSE_OLDSAX = 1<<20,/* parse using SAX2 interface before 2.7.0 */ |
| pcercuei | 0:03b5121a232e | 1113 | XML_PARSE_IGNORE_ENC= 1<<21,/* ignore internal document encoding hint */ |
| pcercuei | 0:03b5121a232e | 1114 | XML_PARSE_BIG_LINES = 1<<22 /* Store big lines numbers in text PSVI field */ |
| pcercuei | 0:03b5121a232e | 1115 | } xmlParserOption; |
| pcercuei | 0:03b5121a232e | 1116 | |
| pcercuei | 0:03b5121a232e | 1117 | XMLPUBFUN void XMLCALL |
| pcercuei | 0:03b5121a232e | 1118 | xmlCtxtReset (xmlParserCtxtPtr ctxt); |
| pcercuei | 0:03b5121a232e | 1119 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 1120 | xmlCtxtResetPush (xmlParserCtxtPtr ctxt, |
| pcercuei | 0:03b5121a232e | 1121 | const char *chunk, |
| pcercuei | 0:03b5121a232e | 1122 | int size, |
| pcercuei | 0:03b5121a232e | 1123 | const char *filename, |
| pcercuei | 0:03b5121a232e | 1124 | const char *encoding); |
| pcercuei | 0:03b5121a232e | 1125 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 1126 | xmlCtxtUseOptions (xmlParserCtxtPtr ctxt, |
| pcercuei | 0:03b5121a232e | 1127 | int options); |
| pcercuei | 0:03b5121a232e | 1128 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 1129 | xmlReadDoc (const xmlChar *cur, |
| pcercuei | 0:03b5121a232e | 1130 | const char *URL, |
| pcercuei | 0:03b5121a232e | 1131 | const char *encoding, |
| pcercuei | 0:03b5121a232e | 1132 | int options); |
| pcercuei | 0:03b5121a232e | 1133 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 1134 | xmlReadFile (const char *URL, |
| pcercuei | 0:03b5121a232e | 1135 | const char *encoding, |
| pcercuei | 0:03b5121a232e | 1136 | int options); |
| pcercuei | 0:03b5121a232e | 1137 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 1138 | xmlReadMemory (const char *buffer, |
| pcercuei | 0:03b5121a232e | 1139 | int size, |
| pcercuei | 0:03b5121a232e | 1140 | const char *URL, |
| pcercuei | 0:03b5121a232e | 1141 | const char *encoding, |
| pcercuei | 0:03b5121a232e | 1142 | int options); |
| pcercuei | 0:03b5121a232e | 1143 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 1144 | xmlReadFd (int fd, |
| pcercuei | 0:03b5121a232e | 1145 | const char *URL, |
| pcercuei | 0:03b5121a232e | 1146 | const char *encoding, |
| pcercuei | 0:03b5121a232e | 1147 | int options); |
| pcercuei | 0:03b5121a232e | 1148 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 1149 | xmlReadIO (xmlInputReadCallback ioread, |
| pcercuei | 0:03b5121a232e | 1150 | xmlInputCloseCallback ioclose, |
| pcercuei | 0:03b5121a232e | 1151 | void *ioctx, |
| pcercuei | 0:03b5121a232e | 1152 | const char *URL, |
| pcercuei | 0:03b5121a232e | 1153 | const char *encoding, |
| pcercuei | 0:03b5121a232e | 1154 | int options); |
| pcercuei | 0:03b5121a232e | 1155 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 1156 | xmlCtxtReadDoc (xmlParserCtxtPtr ctxt, |
| pcercuei | 0:03b5121a232e | 1157 | const xmlChar *cur, |
| pcercuei | 0:03b5121a232e | 1158 | const char *URL, |
| pcercuei | 0:03b5121a232e | 1159 | const char *encoding, |
| pcercuei | 0:03b5121a232e | 1160 | int options); |
| pcercuei | 0:03b5121a232e | 1161 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 1162 | xmlCtxtReadFile (xmlParserCtxtPtr ctxt, |
| pcercuei | 0:03b5121a232e | 1163 | const char *filename, |
| pcercuei | 0:03b5121a232e | 1164 | const char *encoding, |
| pcercuei | 0:03b5121a232e | 1165 | int options); |
| pcercuei | 0:03b5121a232e | 1166 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 1167 | xmlCtxtReadMemory (xmlParserCtxtPtr ctxt, |
| pcercuei | 0:03b5121a232e | 1168 | const char *buffer, |
| pcercuei | 0:03b5121a232e | 1169 | int size, |
| pcercuei | 0:03b5121a232e | 1170 | const char *URL, |
| pcercuei | 0:03b5121a232e | 1171 | const char *encoding, |
| pcercuei | 0:03b5121a232e | 1172 | int options); |
| pcercuei | 0:03b5121a232e | 1173 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 1174 | xmlCtxtReadFd (xmlParserCtxtPtr ctxt, |
| pcercuei | 0:03b5121a232e | 1175 | int fd, |
| pcercuei | 0:03b5121a232e | 1176 | const char *URL, |
| pcercuei | 0:03b5121a232e | 1177 | const char *encoding, |
| pcercuei | 0:03b5121a232e | 1178 | int options); |
| pcercuei | 0:03b5121a232e | 1179 | XMLPUBFUN xmlDocPtr XMLCALL |
| pcercuei | 0:03b5121a232e | 1180 | xmlCtxtReadIO (xmlParserCtxtPtr ctxt, |
| pcercuei | 0:03b5121a232e | 1181 | xmlInputReadCallback ioread, |
| pcercuei | 0:03b5121a232e | 1182 | xmlInputCloseCallback ioclose, |
| pcercuei | 0:03b5121a232e | 1183 | void *ioctx, |
| pcercuei | 0:03b5121a232e | 1184 | const char *URL, |
| pcercuei | 0:03b5121a232e | 1185 | const char *encoding, |
| pcercuei | 0:03b5121a232e | 1186 | int options); |
| pcercuei | 0:03b5121a232e | 1187 | |
| pcercuei | 0:03b5121a232e | 1188 | /* |
| pcercuei | 0:03b5121a232e | 1189 | * Library wide options |
| pcercuei | 0:03b5121a232e | 1190 | */ |
| pcercuei | 0:03b5121a232e | 1191 | /** |
| pcercuei | 0:03b5121a232e | 1192 | * xmlFeature: |
| pcercuei | 0:03b5121a232e | 1193 | * |
| pcercuei | 0:03b5121a232e | 1194 | * Used to examine the existance of features that can be enabled |
| pcercuei | 0:03b5121a232e | 1195 | * or disabled at compile-time. |
| pcercuei | 0:03b5121a232e | 1196 | * They used to be called XML_FEATURE_xxx but this clashed with Expat |
| pcercuei | 0:03b5121a232e | 1197 | */ |
| pcercuei | 0:03b5121a232e | 1198 | typedef enum { |
| pcercuei | 0:03b5121a232e | 1199 | XML_WITH_THREAD = 1, |
| pcercuei | 0:03b5121a232e | 1200 | XML_WITH_TREE = 2, |
| pcercuei | 0:03b5121a232e | 1201 | XML_WITH_OUTPUT = 3, |
| pcercuei | 0:03b5121a232e | 1202 | XML_WITH_PUSH = 4, |
| pcercuei | 0:03b5121a232e | 1203 | XML_WITH_READER = 5, |
| pcercuei | 0:03b5121a232e | 1204 | XML_WITH_PATTERN = 6, |
| pcercuei | 0:03b5121a232e | 1205 | XML_WITH_WRITER = 7, |
| pcercuei | 0:03b5121a232e | 1206 | XML_WITH_SAX1 = 8, |
| pcercuei | 0:03b5121a232e | 1207 | XML_WITH_FTP = 9, |
| pcercuei | 0:03b5121a232e | 1208 | XML_WITH_HTTP = 10, |
| pcercuei | 0:03b5121a232e | 1209 | XML_WITH_VALID = 11, |
| pcercuei | 0:03b5121a232e | 1210 | XML_WITH_HTML = 12, |
| pcercuei | 0:03b5121a232e | 1211 | XML_WITH_LEGACY = 13, |
| pcercuei | 0:03b5121a232e | 1212 | XML_WITH_C14N = 14, |
| pcercuei | 0:03b5121a232e | 1213 | XML_WITH_CATALOG = 15, |
| pcercuei | 0:03b5121a232e | 1214 | XML_WITH_XPATH = 16, |
| pcercuei | 0:03b5121a232e | 1215 | XML_WITH_XPTR = 17, |
| pcercuei | 0:03b5121a232e | 1216 | XML_WITH_XINCLUDE = 18, |
| pcercuei | 0:03b5121a232e | 1217 | XML_WITH_ICONV = 19, |
| pcercuei | 0:03b5121a232e | 1218 | XML_WITH_ISO8859X = 20, |
| pcercuei | 0:03b5121a232e | 1219 | XML_WITH_UNICODE = 21, |
| pcercuei | 0:03b5121a232e | 1220 | XML_WITH_REGEXP = 22, |
| pcercuei | 0:03b5121a232e | 1221 | XML_WITH_AUTOMATA = 23, |
| pcercuei | 0:03b5121a232e | 1222 | XML_WITH_EXPR = 24, |
| pcercuei | 0:03b5121a232e | 1223 | XML_WITH_SCHEMAS = 25, |
| pcercuei | 0:03b5121a232e | 1224 | XML_WITH_SCHEMATRON = 26, |
| pcercuei | 0:03b5121a232e | 1225 | XML_WITH_MODULES = 27, |
| pcercuei | 0:03b5121a232e | 1226 | XML_WITH_DEBUG = 28, |
| pcercuei | 0:03b5121a232e | 1227 | XML_WITH_DEBUG_MEM = 29, |
| pcercuei | 0:03b5121a232e | 1228 | XML_WITH_DEBUG_RUN = 30, |
| pcercuei | 0:03b5121a232e | 1229 | XML_WITH_ZLIB = 31, |
| pcercuei | 0:03b5121a232e | 1230 | XML_WITH_ICU = 32, |
| pcercuei | 0:03b5121a232e | 1231 | XML_WITH_LZMA = 33, |
| pcercuei | 0:03b5121a232e | 1232 | XML_WITH_NONE = 99999 /* just to be sure of allocation size */ |
| pcercuei | 0:03b5121a232e | 1233 | } xmlFeature; |
| pcercuei | 0:03b5121a232e | 1234 | |
| pcercuei | 0:03b5121a232e | 1235 | XMLPUBFUN int XMLCALL |
| pcercuei | 0:03b5121a232e | 1236 | xmlHasFeature (xmlFeature feature); |
| pcercuei | 0:03b5121a232e | 1237 | |
| pcercuei | 0:03b5121a232e | 1238 | #ifdef __cplusplus |
| pcercuei | 0:03b5121a232e | 1239 | } |
| pcercuei | 0:03b5121a232e | 1240 | #endif |
| pcercuei | 0:03b5121a232e | 1241 | #endif /* __XML_PARSER_H__ */ |
| pcercuei | 0:03b5121a232e | 1242 |