libxml-parser.html revision cfba2fe0bbbdd1158666fc1090c7f48c0fdb00e1
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>parser</title><meta name="generator" content="DocBook XSL Stylesheets V1.58.1"><style xmlns="http://www.w3.org/TR/xhtml1/transitional" type="text/css">
2        .synopsis, .classsynopsis {
3            background: #eeeeee;
4            border: solid 1px #aaaaaa;
5            padding: 0.5em;
6        }
7        .programlisting {
8            background: #eeeeff;
9            border: solid 1px #aaaaff;
10            padding: 0.5em;
11        }
12        .variablelist {
13            padding: 4px;
14            margin-left: 3em;
15        }
16        .navigation {
17            background: #ffeeee;
18            border: solid 1px #ffaaaa;
19            margin-top: 0.5em;
20            margin-bottom: 0.5em;
21        }
22        .navigation a {
23            color: #770000;
24        }
25        .navigation a:visited {
26            color: #550000;
27        }
28        .navigation .title {
29            font-size: 200%;
30        }
31      </style><link rel="home" href="index.html" title="Gnome XML Library Reference Manual"><link rel="up" href="libxml-lib.html" title="Libxml Library Reference"><link rel="previous" href="libxml-lib.html" title="Libxml Library Reference"><link rel="next" href="libxml-xmlreader.html" title="xmlreader"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-lib.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td><td><a accesskey="u" href="libxml-lib.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td><th width="100%" align="center">Gnome XML Library Reference Manual</th><td><a accesskey="n" href="libxml-xmlreader.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td></tr></table><div class="refentry" lang="en"><a name="libxml-parser"></a><div class="titlepage"></div><div class="refnamediv"><h2>parser</h2><p>parser &#8212; </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
32
33
34
35#define     <a href="libxml-parser.html#XML-DEFAULT-VERSION-CAPS">XML_DEFAULT_VERSION</a>
36void        (<a href="libxml-parser.html#xmlParserInputDeallocate">*xmlParserInputDeallocate</a>)     (<a href="libxml-tree.html#xmlChar">xmlChar</a> *str);
37struct      <a href="libxml-parser.html#xmlParserInput">xmlParserInput</a>;
38struct      <a href="libxml-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a>;
39typedef     <a href="libxml-parser.html#xmlParserNodeInfoPtr">xmlParserNodeInfoPtr</a>;
40struct      <a href="libxml-parser.html#xmlParserNodeInfoSeq">xmlParserNodeInfoSeq</a>;
41typedef     <a href="libxml-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a>;
42enum        <a href="libxml-parser.html#xmlParserInputState">xmlParserInputState</a>;
43#define     <a href="libxml-parser.html#XML-DETECT-IDS-CAPS">XML_DETECT_IDS</a>
44#define     <a href="libxml-parser.html#XML-COMPLETE-ATTRS-CAPS">XML_COMPLETE_ATTRS</a>
45#define     <a href="libxml-parser.html#XML-SKIP-IDS-CAPS">XML_SKIP_IDS</a>
46struct      <a href="libxml-parser.html#xmlParserCtxt">xmlParserCtxt</a>;
47struct      <a href="libxml-parser.html#xmlSAXLocator">xmlSAXLocator</a>;
48<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> (<a href="libxml-parser.html#resolveEntitySAXFunc">*resolveEntitySAXFunc</a>)   (void *ctx,
49                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *publicId,
50                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *systemId);
51void        (<a href="libxml-parser.html#internalSubsetSAXFunc">*internalSubsetSAXFunc</a>)        (void *ctx,
52                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name,
53                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ExternalID,
54                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *SystemID);
55void        (<a href="libxml-parser.html#externalSubsetSAXFunc">*externalSubsetSAXFunc</a>)        (void *ctx,
56                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name,
57                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ExternalID,
58                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *SystemID);
59<a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> (<a href="libxml-parser.html#getEntitySAXFunc">*getEntitySAXFunc</a>)            (void *ctx,
60                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);
61<a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> (<a href="libxml-parser.html#getParameterEntitySAXFunc">*getParameterEntitySAXFunc</a>)   (void *ctx,
62                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);
63void        (<a href="libxml-parser.html#entityDeclSAXFunc">*entityDeclSAXFunc</a>)            (void *ctx,
64                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name,
65                                             int type,
66                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *publicId,
67                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *systemId,
68                                             <a href="libxml-tree.html#xmlChar">xmlChar</a> *content);
69void        (<a href="libxml-parser.html#notationDeclSAXFunc">*notationDeclSAXFunc</a>)          (void *ctx,
70                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name,
71                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *publicId,
72                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *systemId);
73void        (<a href="libxml-parser.html#attributeDeclSAXFunc">*attributeDeclSAXFunc</a>)         (void *ctx,
74                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *elem,
75                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *fullname,
76                                             int type,
77                                             int def,
78                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *defaultValue,
79                                             <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree);
80void        (<a href="libxml-parser.html#elementDeclSAXFunc">*elementDeclSAXFunc</a>)           (void *ctx,
81                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name,
82                                             int type,
83                                             <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content);
84void        (<a href="libxml-parser.html#unparsedEntityDeclSAXFunc">*unparsedEntityDeclSAXFunc</a>)    (void *ctx,
85                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name,
86                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *publicId,
87                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *systemId,
88                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *notationName);
89void        (<a href="libxml-parser.html#setDocumentLocatorSAXFunc">*setDocumentLocatorSAXFunc</a>)    (void *ctx,
90                                             <a href="libxml-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc);
91void        (<a href="libxml-parser.html#startDocumentSAXFunc">*startDocumentSAXFunc</a>)         (void *ctx);
92void        (<a href="libxml-parser.html#endDocumentSAXFunc">*endDocumentSAXFunc</a>)           (void *ctx);
93void        (<a href="libxml-parser.html#startElementSAXFunc">*startElementSAXFunc</a>)          (void *ctx,
94                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name,
95                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> **atts);
96void        (<a href="libxml-parser.html#endElementSAXFunc">*endElementSAXFunc</a>)            (void *ctx,
97                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);
98void        (<a href="libxml-parser.html#attributeSAXFunc">*attributeSAXFunc</a>)             (void *ctx,
99                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name,
100                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value);
101void        (<a href="libxml-parser.html#referenceSAXFunc">*referenceSAXFunc</a>)             (void *ctx,
102                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);
103void        (<a href="libxml-parser.html#charactersSAXFunc">*charactersSAXFunc</a>)            (void *ctx,
104                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ch,
105                                             int len);
106void        (<a href="libxml-parser.html#ignorableWhitespaceSAXFunc">*ignorableWhitespaceSAXFunc</a>)   (void *ctx,
107                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ch,
108                                             int len);
109void        (<a href="libxml-parser.html#processingInstructionSAXFunc">*processingInstructionSAXFunc</a>) (void *ctx,
110                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *target,
111                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *data);
112void        (<a href="libxml-parser.html#commentSAXFunc">*commentSAXFunc</a>)               (void *ctx,
113                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value);
114void        (<a href="libxml-parser.html#cdataBlockSAXFunc">*cdataBlockSAXFunc</a>)            (void *ctx,
115                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value,
116                                             int len);
117void        (<a href="libxml-parser.html#warningSAXFunc">*warningSAXFunc</a>)               (void *ctx,
118                                             const char *msg,
119                                             ...);
120void        (<a href="libxml-parser.html#errorSAXFunc">*errorSAXFunc</a>)                 (void *ctx,
121                                             const char *msg,
122                                             ...);
123void        (<a href="libxml-parser.html#fatalErrorSAXFunc">*fatalErrorSAXFunc</a>)            (void *ctx,
124                                             const char *msg,
125                                             ...);
126int         (<a href="libxml-parser.html#isStandaloneSAXFunc">*isStandaloneSAXFunc</a>)          (void *ctx);
127int         (<a href="libxml-parser.html#hasInternalSubsetSAXFunc">*hasInternalSubsetSAXFunc</a>)     (void *ctx);
128int         (<a href="libxml-parser.html#hasExternalSubsetSAXFunc">*hasExternalSubsetSAXFunc</a>)     (void *ctx);
129struct      <a href="libxml-parser.html#xmlSAXHandler">xmlSAXHandler</a>;
130<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> (<a href="libxml-parser.html#xmlExternalEntityLoader">*xmlExternalEntityLoader</a>)
131                                            (const char *URL,
132                                             const char *ID,
133                                             <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> context);
134void        <a href="libxml-parser.html#xmlInitParser">xmlInitParser</a>                   (void);
135void        <a href="libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a>                (void);
136int         <a href="libxml-parser.html#xmlParserInputRead">xmlParserInputRead</a>              (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> in,
137                                             int len);
138int         <a href="libxml-parser.html#xmlParserInputGrow">xmlParserInputGrow</a>              (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> in,
139                                             int len);
140<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-parser.html#xmlStrdup">xmlStrdup</a>                       (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *cur);
141<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-parser.html#xmlStrndup">xmlStrndup</a>                      (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *cur,
142                                             int len);
143<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-parser.html#xmlCharStrndup">xmlCharStrndup</a>                  (const char *cur,
144                                             int len);
145<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-parser.html#xmlCharStrdup">xmlCharStrdup</a>                   (const char *cur);
146<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-parser.html#xmlStrsub">xmlStrsub</a>                       (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str,
147                                             int start,
148                                             int len);
149const <a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-parser.html#xmlStrchr">xmlStrchr</a>                    (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str,
150                                             <a href="libxml-tree.html#xmlChar">xmlChar</a> val);
151const <a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-parser.html#xmlStrstr">xmlStrstr</a>                    (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str,
152                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *val);
153const <a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-parser.html#xmlStrcasestr">xmlStrcasestr</a>                (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str,
154                                             <a href="libxml-tree.html#xmlChar">xmlChar</a> *val);
155int         <a href="libxml-parser.html#xmlStrcmp">xmlStrcmp</a>                       (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str1,
156                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str2);
157int         <a href="libxml-parser.html#xmlStrncmp">xmlStrncmp</a>                      (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str1,
158                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str2,
159                                             int len);
160int         <a href="libxml-parser.html#xmlStrcasecmp">xmlStrcasecmp</a>                   (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str1,
161                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str2);
162int         <a href="libxml-parser.html#xmlStrncasecmp">xmlStrncasecmp</a>                  (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str1,
163                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str2,
164                                             int len);
165int         <a href="libxml-parser.html#xmlStrEqual">xmlStrEqual</a>                     (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str1,
166                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str2);
167int         <a href="libxml-parser.html#xmlStrlen">xmlStrlen</a>                       (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str);
168<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-parser.html#xmlStrcat">xmlStrcat</a>                       (<a href="libxml-tree.html#xmlChar">xmlChar</a> *cur,
169                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *add);
170<a href="libxml-tree.html#xmlChar">xmlChar</a>*    <a href="libxml-parser.html#xmlStrncat">xmlStrncat</a>                      (<a href="libxml-tree.html#xmlChar">xmlChar</a> *cur,
171                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *add,
172                                             int len);
173<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   <a href="libxml-parser.html#xmlParseDoc">xmlParseDoc</a>                     (<a href="libxml-tree.html#xmlChar">xmlChar</a> *cur);
174<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   <a href="libxml-parser.html#xmlParseMemory">xmlParseMemory</a>                  (const char *buffer,
175                                             int size);
176<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   <a href="libxml-parser.html#xmlParseFile">xmlParseFile</a>                    (const char *filename);
177int         <a href="libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a>    (int val);
178int         <a href="libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a>            (int val);
179void        <a href="libxml-parser.html#xmlStopParser">xmlStopParser</a>                   (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
180int         <a href="libxml-parser.html#xmlPedanticParserDefault">xmlPedanticParserDefault</a>        (int val);
181int         <a href="libxml-parser.html#xmlLineNumbersDefault">xmlLineNumbersDefault</a>           (int val);
182<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   <a href="libxml-parser.html#xmlRecoverDoc">xmlRecoverDoc</a>                   (<a href="libxml-tree.html#xmlChar">xmlChar</a> *cur);
183<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   <a href="libxml-parser.html#xmlRecoverMemory">xmlRecoverMemory</a>                (const char *buffer,
184                                             int size);
185<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   <a href="libxml-parser.html#xmlRecoverFile">xmlRecoverFile</a>                  (const char *filename);
186int         <a href="libxml-parser.html#xmlParseDocument">xmlParseDocument</a>                (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
187int         <a href="libxml-parser.html#xmlParseExtParsedEnt">xmlParseExtParsedEnt</a>            (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
188<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   <a href="libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a>                  (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
189                                             <a href="libxml-tree.html#xmlChar">xmlChar</a> *cur,
190                                             int recovery);
191int         <a href="libxml-parser.html#xmlSAXUserParseFile">xmlSAXUserParseFile</a>             (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
192                                             void *user_data,
193                                             const char *filename);
194int         <a href="libxml-parser.html#xmlSAXUserParseMemory">xmlSAXUserParseMemory</a>           (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
195                                             void *user_data,
196                                             const char *buffer,
197                                             int size);
198<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   <a href="libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a>               (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
199                                             const char *buffer,
200                                             int size,
201                                             int recovery);
202<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   <a href="libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a>       (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
203                                             const char *buffer,
204                                             int size,
205                                             int recovery,
206                                             void *data);
207<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   <a href="libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a>                 (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
208                                             const char *filename,
209                                             int recovery);
210<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   <a href="libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a>         (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
211                                             const char *filename,
212                                             int recovery,
213                                             void *data);
214<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   <a href="libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a>               (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
215                                             const char *filename);
216<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   <a href="libxml-parser.html#xmlParseEntity">xmlParseEntity</a>                  (const char *filename);
217<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a>   <a href="libxml-parser.html#xmlParseDTD">xmlParseDTD</a>                     (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ExternalID,
218                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *SystemID);
219<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a>   <a href="libxml-parser.html#xmlSAXParseDTD">xmlSAXParseDTD</a>                  (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
220                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ExternalID,
221                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *SystemID);
222<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a>   <a href="libxml-parser.html#xmlIOParseDTD">xmlIOParseDTD</a>                   (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
223                                             <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input,
224                                             <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
225int         <a href="libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a>     (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
226                                             <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
227                                             void *user_data,
228                                             int depth,
229                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *string,
230                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> *lst);
231int         <a href="libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a>
232                                            (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
233                                             <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
234                                             void *user_data,
235                                             int depth,
236                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *string,
237                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> *lst,
238                                             int recover);
239int         <a href="libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a>          (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
240                                             <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
241                                             void *user_data,
242                                             int depth,
243                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *URL,
244                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ID,
245                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> *lst);
246int         <a href="libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a>      (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctx,
247                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *URL,
248                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ID,
249                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> *lst);
250int         <a href="libxml-parser.html#xmlInitParserCtxt">xmlInitParserCtxt</a>               (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
251void        <a href="libxml-parser.html#xmlClearParserCtxt">xmlClearParserCtxt</a>              (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
252void        <a href="libxml-parser.html#xmlFreeParserCtxt">xmlFreeParserCtxt</a>               (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
253void        <a href="libxml-parser.html#xmlSetupParserForBuffer">xmlSetupParserForBuffer</a>         (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt,
254                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *buffer,
255                                             const char *filename);
256<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="libxml-parser.html#xmlCreateDocParserCtxt">xmlCreateDocParserCtxt</a>     (<a href="libxml-tree.html#xmlChar">xmlChar</a> *cur);
257int         <a href="libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a>              (int *len,
258                                             const char **result);
259int         <a href="libxml-parser.html#xmlGetFeature">xmlGetFeature</a>                   (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt,
260                                             const char *name,
261                                             void *result);
262int         <a href="libxml-parser.html#xmlSetFeature">xmlSetFeature</a>                   (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt,
263                                             const char *name,
264                                             void *value);
265<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a>    (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
266                                             void *user_data,
267                                             const char *chunk,
268                                             int size,
269                                             const char *filename);
270int         <a href="libxml-parser.html#xmlParseChunk">xmlParseChunk</a>                   (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt,
271                                             const char *chunk,
272                                             int size,
273                                             int terminate);
274<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="libxml-parser.html#xmlCreateIOParserCtxt">xmlCreateIOParserCtxt</a>      (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
275                                             void *user_data,
276                                             <a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread,
277                                             <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose,
278                                             void *ioctx,
279                                             <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
280<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="libxml-parser.html#xmlNewIOInputStream">xmlNewIOInputStream</a>       (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt,
281                                             <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input,
282                                             <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
283const <a href="libxml-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a>* <a href="libxml-parser.html#xmlParserFindNodeInfo">xmlParserFindNodeInfo</a>
284                                            (const <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt,
285                                             const <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node);
286void        <a href="libxml-parser.html#xmlInitNodeInfoSeq">xmlInitNodeInfoSeq</a>              (<a href="libxml-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq);
287void        <a href="libxml-parser.html#xmlClearNodeInfoSeq">xmlClearNodeInfoSeq</a>             (<a href="libxml-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq);
288unsigned <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="long">long</GTKDOCLINK> <a href="libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a>    (const <a href="libxml-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq,
289                                             const <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node);
290void        <a href="libxml-parser.html#xmlParserAddNodeInfo">xmlParserAddNodeInfo</a>            (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt,
291                                             const <a href="libxml-parser.html#xmlParserNodeInfoPtr">xmlParserNodeInfoPtr</a> info);
292void        <a href="libxml-parser.html#xmlSetExternalEntityLoader">xmlSetExternalEntityLoader</a>      (<a href="libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a> f);
293<a href="libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a> <a href="libxml-parser.html#xmlGetExternalEntityLoader">xmlGetExternalEntityLoader</a>
294                                            (void);
295<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="libxml-parser.html#xmlLoadExternalEntity">xmlLoadExternalEntity</a>     (const char *URL,
296                                             const char *ID,
297                                             <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
298</pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
299
300</p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="XML-DEFAULT-VERSION-CAPS"></a>XML_DEFAULT_VERSION</h3><pre class="programlisting">#define XML_DEFAULT_VERSION	"1.0"
301</pre><p>
302The default version of XML used: 1.0</p><p>
303
304</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserInputDeallocate"></a>xmlParserInputDeallocate ()</h3><pre class="programlisting">void        (*xmlParserInputDeallocate)     (<a href="libxml-tree.html#xmlChar">xmlChar</a> *str);</pre><p>
305Callback for freeing some parser input allocations.</p><p>
306
307</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str</tt></i>�:</span></td><td>  the string to deallocate
308</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserInput"></a>struct xmlParserInput</h3><pre class="programlisting">struct xmlParserInput {
309    /* Input buffer */
310    xmlParserInputBufferPtr buf;      /* UTF-8 encoded buffer */
311
312    const char *filename;             /* The file analyzed, if any */
313    const char *directory;            /* the directory/base of the file */
314    const xmlChar *base;              /* Base of the array to parse */
315    const xmlChar *cur;               /* Current char being parsed */
316    const xmlChar *end;               /* end of the array to parse */
317    int length;                       /* length if known */
318    int line;                         /* Current line */
319    int col;                          /* Current column */
320    /*
321     * NOTE: consumed is only tested for equality in the parser code,
322     *       so even if there is an overflow this should not give troubles
323     *       for parsing very large instances.
324     */
325    unsigned long consumed;           /* How many xmlChars already consumed */
326    xmlParserInputDeallocate free;    /* function to deallocate the base */
327    const xmlChar *encoding;          /* the encoding string for entity */
328    const xmlChar *version;           /* the version string for entity */
329    int standalone;                   /* Was that entity marked standalone */
330};
331</pre><p>
332An xmlParserInput is an input flow for the XML processor.
333Each entity parsed is associated an xmlParserInput (except the
334few predefined ones). This is the case both for internal entities
335- in which case the flow is already completely in memory - or
336external entities - in which case we use the buf structure for
337progressive reading and I18N conversions to the internal UTF-8 format.</p><p>
338
339</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserNodeInfo"></a>struct xmlParserNodeInfo</h3><pre class="programlisting">struct xmlParserNodeInfo {
340  const struct _xmlNode* node;
341  /* Position &amp; line # that text that created the node begins &amp; ends on */
342  unsigned long begin_pos;
343  unsigned long begin_line;
344  unsigned long end_pos;
345  unsigned long end_line;
346};
347</pre><p>
348The parser can be asked to collect Node informations, i.e. at what
349place in the file they were detected. 
350NOTE: This is off by default and not very well tested.</p><p>
351
352</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserNodeInfoPtr"></a>xmlParserNodeInfoPtr</h3><pre class="programlisting">typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
353</pre><p>
354
355</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserNodeInfoSeq"></a>struct xmlParserNodeInfoSeq</h3><pre class="programlisting">struct xmlParserNodeInfoSeq {
356  unsigned long maximum;
357  unsigned long length;
358  xmlParserNodeInfo* buffer;
359};
360</pre><p>
361
362</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserNodeInfoSeqPtr"></a>xmlParserNodeInfoSeqPtr</h3><pre class="programlisting">typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;
363</pre><p>
364
365</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserInputState"></a>enum xmlParserInputState</h3><pre class="programlisting">typedef enum {
366    XML_PARSER_EOF = -1,	/* nothing is to be parsed */
367    XML_PARSER_START = 0,	/* nothing has been parsed */
368    XML_PARSER_MISC,		/* Misc* before int subset */
369    XML_PARSER_PI,		/* Within a processing instruction */
370    XML_PARSER_DTD,		/* within some DTD content */
371    XML_PARSER_PROLOG,		/* Misc* after internal subset */
372    XML_PARSER_COMMENT,		/* within a comment */
373    XML_PARSER_START_TAG,	/* within a start tag */
374    XML_PARSER_CONTENT,		/* within the content */
375    XML_PARSER_CDATA_SECTION,	/* within a CDATA section */
376    XML_PARSER_END_TAG,		/* within a closing tag */
377    XML_PARSER_ENTITY_DECL,	/* within an entity declaration */
378    XML_PARSER_ENTITY_VALUE,	/* within an entity value in a decl */
379    XML_PARSER_ATTRIBUTE_VALUE,	/* within an attribute value */
380    XML_PARSER_SYSTEM_LITERAL,	/* within a SYSTEM value */
381    XML_PARSER_EPILOG, 		/* the Misc* after the last end tag */
382    XML_PARSER_IGNORE,		/* within an IGNORED section */
383    XML_PARSER_PUBLIC_LITERAL 	/* within a PUBLIC value */
384} xmlParserInputState;
385</pre><p>
386The parser is now working also as a state based parser.
387The recursive one use the state info for entities processing.</p><p>
388
389</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="XML-DETECT-IDS-CAPS"></a>XML_DETECT_IDS</h3><pre class="programlisting">#define XML_DETECT_IDS		2
390</pre><p>
391Bit in the loadsubset context field to tell to do ID/REFs lookups.
392Use it to initialize xmlLoadExtDtdDefaultValue.</p><p>
393
394</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="XML-COMPLETE-ATTRS-CAPS"></a>XML_COMPLETE_ATTRS</h3><pre class="programlisting">#define XML_COMPLETE_ATTRS	4
395</pre><p>
396Bit in the loadsubset context field to tell to do complete the
397elements attributes lists with the ones defaulted from the DTDs.
398Use it to initialize xmlLoadExtDtdDefaultValue.</p><p>
399
400</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="XML-SKIP-IDS-CAPS"></a>XML_SKIP_IDS</h3><pre class="programlisting">#define XML_SKIP_IDS		8
401</pre><p>
402Bit in the loadsubset context field to tell to not do ID/REFs registration.
403Used to initialize xmlLoadExtDtdDefaultValue in some special cases.</p><p>
404
405</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserCtxt"></a>struct xmlParserCtxt</h3><pre class="programlisting">struct xmlParserCtxt {
406    struct _xmlSAXHandler *sax;       /* The SAX handler */
407    void            *userData;        /* For SAX interface only, used by DOM build */
408    xmlDocPtr           myDoc;        /* the document being built */
409    int            wellFormed;        /* is the document well formed */
410    int       replaceEntities;        /* shall we replace entities ? */
411    const xmlChar    *version;        /* the XML version string */
412    const xmlChar   *encoding;        /* the declared encoding, if any */
413    int            standalone;        /* standalone document */
414    int                  html;        /* an HTML(1)/Docbook(2) document */
415
416    /* Input stream stack */
417    xmlParserInputPtr  input;         /* Current input stream */
418    int                inputNr;       /* Number of current input streams */
419    int                inputMax;      /* Max number of input streams */
420    xmlParserInputPtr *inputTab;      /* stack of inputs */
421
422    /* Node analysis stack only used for DOM building */
423    xmlNodePtr         node;          /* Current parsed Node */
424    int                nodeNr;        /* Depth of the parsing stack */
425    int                nodeMax;       /* Max depth of the parsing stack */
426    xmlNodePtr        *nodeTab;       /* array of nodes */
427
428    int record_info;                  /* Whether node info should be kept */
429    xmlParserNodeInfoSeq node_seq;    /* info about each node parsed */
430
431    int errNo;                        /* error code */
432
433    int     hasExternalSubset;        /* reference and external subset */
434    int             hasPErefs;        /* the internal subset has PE refs */
435    int              external;        /* are we parsing an external entity */
436
437    int                 valid;        /* is the document valid */
438    int              validate;        /* shall we try to validate ? */
439    xmlValidCtxt        vctxt;        /* The validity context */
440
441    xmlParserInputState instate;      /* current type of input */
442    int                 token;        /* next char look-ahead */    
443
444    char           *directory;        /* the data directory */
445
446    /* Node name stack */
447    xmlChar           *name;          /* Current parsed Node */
448    int                nameNr;        /* Depth of the parsing stack */
449    int                nameMax;       /* Max depth of the parsing stack */
450    xmlChar *         *nameTab;       /* array of nodes */
451
452    long               nbChars;       /* number of xmlChar processed */
453    long            checkIndex;       /* used by progressive parsing lookup */
454    int             keepBlanks;       /* ugly but ... */
455    int             disableSAX;       /* SAX callbacks are disabled */
456    int               inSubset;       /* Parsing is in int 1/ext 2 subset */
457    xmlChar *          intSubName;    /* name of subset */
458    xmlChar *          extSubURI;     /* URI of external subset */
459    xmlChar *          extSubSystem;  /* SYSTEM ID of external subset */
460
461    /* xml:space values */
462    int *              space;         /* Should the parser preserve spaces */
463    int                spaceNr;       /* Depth of the parsing stack */
464    int                spaceMax;      /* Max depth of the parsing stack */
465    int *              spaceTab;      /* array of space infos */
466
467    int                depth;         /* to prevent entity substitution loops */
468    xmlParserInputPtr  entity;        /* used to check entities boundaries */
469    int                charset;       /* encoding of the in-memory content
470				         actually an xmlCharEncoding */
471    int                nodelen;       /* Those two fields are there to */
472    int                nodemem;       /* Speed up large node parsing */
473    int                pedantic;      /* signal pedantic warnings */
474    void              *_private;      /* For user data, libxml won't touch it */
475
476    int                loadsubset;    /* should the external subset be loaded */
477    int                linenumbers;   /* set line number in element content */
478    void              *catalogs;       /* document's own catalog */
479    int                recovery;      /* run in recovery mode */
480    int                progressive;   /* is this a progressive parsing */
481};
482</pre><p>
483The parser context.
484NOTE This doesn't completely define the parser state, the (current ?)
485     design of the parser uses recursive function calls since this allow
486     and easy mapping from the production rules of the specification
487     to the actual code. The drawback is that the actual function call
488     also reflect the parser state. However most of the parsing routines
489     takes as the only argument the parser context pointer, so migrating
490     to a state based parser for progressive parsing shouldn't be too hard.</p><p>
491
492</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSAXLocator"></a>struct xmlSAXLocator</h3><pre class="programlisting">struct xmlSAXLocator {
493    const xmlChar *(*getPublicId)(void *ctx);
494    const xmlChar *(*getSystemId)(void *ctx);
495    int (*getLineNumber)(void *ctx);
496    int (*getColumnNumber)(void *ctx);
497};
498</pre><p>
499A SAX Locator.</p><p>
500
501</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="resolveEntitySAXFunc"></a>resolveEntitySAXFunc ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> (*resolveEntitySAXFunc)   (void *ctx,
502                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *publicId,
503                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *systemId);</pre><p>
504Callback:
505The entity loader, to control the loading of external entities,
506the application can either:
507   - override this <a href="libxml-SAX.html#resolveEntity">resolveEntity</a>() callback in the SAX block
508   - or better use the <a href="libxml-parser.html#xmlSetExternalEntityLoader">xmlSetExternalEntityLoader</a>() function to
509     set up it's own entity resolution routine</p><p>
510
511</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
512</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>�:</span></td><td> The public ID of the entity
513</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>�:</span></td><td> The system ID of the entity
514</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlParserInputPtr if inlined or NULL for DOM behaviour.
515</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="internalSubsetSAXFunc"></a>internalSubsetSAXFunc ()</h3><pre class="programlisting">void        (*internalSubsetSAXFunc)        (void *ctx,
516                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name,
517                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ExternalID,
518                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *SystemID);</pre><p>
519Callback on internal subset declaration.</p><p>
520
521</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
522</td></tr><tr><td><span class="term"><i><tt>name</tt></i>�:</span></td><td>  the root element name
523</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>�:</span></td><td>  the external ID
524</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>�:</span></td><td>  the SYSTEM ID (e.g. filename or URL)
525</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="externalSubsetSAXFunc"></a>externalSubsetSAXFunc ()</h3><pre class="programlisting">void        (*externalSubsetSAXFunc)        (void *ctx,
526                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name,
527                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ExternalID,
528                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *SystemID);</pre><p>
529Callback on external subset declaration.</p><p>
530
531</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
532</td></tr><tr><td><span class="term"><i><tt>name</tt></i>�:</span></td><td>  the root element name
533</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>�:</span></td><td>  the external ID
534</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>�:</span></td><td>  the SYSTEM ID (e.g. filename or URL)
535</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="getEntitySAXFunc"></a>getEntitySAXFunc ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> (*getEntitySAXFunc)            (void *ctx,
536                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);</pre><p>
537Get an entity by name.</p><p>
538
539</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
540</td></tr><tr><td><span class="term"><i><tt>name</tt></i>�:</span></td><td> The entity name
541</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlEntityPtr if found.
542</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="getParameterEntitySAXFunc"></a>getParameterEntitySAXFunc ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> (*getParameterEntitySAXFunc)   (void *ctx,
543                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);</pre><p>
544Get a parameter entity by name.</p><p>
545
546</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
547</td></tr><tr><td><span class="term"><i><tt>name</tt></i>�:</span></td><td> The entity name
548</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlEntityPtr if found.
549</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="entityDeclSAXFunc"></a>entityDeclSAXFunc ()</h3><pre class="programlisting">void        (*entityDeclSAXFunc)            (void *ctx,
550                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name,
551                                             int type,
552                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *publicId,
553                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *systemId,
554                                             <a href="libxml-tree.html#xmlChar">xmlChar</a> *content);</pre><p>
555An entity definition has been parsed.</p><p>
556
557</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
558</td></tr><tr><td><span class="term"><i><tt>name</tt></i>�:</span></td><td>  the entity name 
559</td></tr><tr><td><span class="term"><i><tt>type</tt></i>�:</span></td><td>  the entity type 
560</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>�:</span></td><td> The public ID of the entity
561</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>�:</span></td><td> The system ID of the entity
562</td></tr><tr><td><span class="term"><i><tt>content</tt></i>�:</span></td><td> the entity value (without processing).
563</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="notationDeclSAXFunc"></a>notationDeclSAXFunc ()</h3><pre class="programlisting">void        (*notationDeclSAXFunc)          (void *ctx,
564                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name,
565                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *publicId,
566                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *systemId);</pre><p>
567What to do when a notation declaration has been parsed.</p><p>
568
569</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
570</td></tr><tr><td><span class="term"><i><tt>name</tt></i>�:</span></td><td> The name of the notation
571</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>�:</span></td><td> The public ID of the entity
572</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>�:</span></td><td> The system ID of the entity
573</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="attributeDeclSAXFunc"></a>attributeDeclSAXFunc ()</h3><pre class="programlisting">void        (*attributeDeclSAXFunc)         (void *ctx,
574                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *elem,
575                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *fullname,
576                                             int type,
577                                             int def,
578                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *defaultValue,
579                                             <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree);</pre><p>
580An attribute definition has been parsed.</p><p>
581
582</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
583</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>�:</span></td><td>  the name of the element
584</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>�:</span></td><td>  the attribute name 
585</td></tr><tr><td><span class="term"><i><tt>type</tt></i>�:</span></td><td>  the attribute type 
586</td></tr><tr><td><span class="term"><i><tt>def</tt></i>�:</span></td><td>  the type of default value
587</td></tr><tr><td><span class="term"><i><tt>defaultValue</tt></i>�:</span></td><td> the attribute default value
588</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>�:</span></td><td>  the tree of enumerated value set
589</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="elementDeclSAXFunc"></a>elementDeclSAXFunc ()</h3><pre class="programlisting">void        (*elementDeclSAXFunc)           (void *ctx,
590                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name,
591                                             int type,
592                                             <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content);</pre><p>
593An element definition has been parsed.</p><p>
594
595</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
596</td></tr><tr><td><span class="term"><i><tt>name</tt></i>�:</span></td><td>  the element name 
597</td></tr><tr><td><span class="term"><i><tt>type</tt></i>�:</span></td><td>  the element type 
598</td></tr><tr><td><span class="term"><i><tt>content</tt></i>�:</span></td><td> the element value tree
599</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="unparsedEntityDeclSAXFunc"></a>unparsedEntityDeclSAXFunc ()</h3><pre class="programlisting">void        (*unparsedEntityDeclSAXFunc)    (void *ctx,
600                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name,
601                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *publicId,
602                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *systemId,
603                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *notationName);</pre><p>
604What to do when an unparsed entity declaration is parsed.</p><p>
605
606</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
607</td></tr><tr><td><span class="term"><i><tt>name</tt></i>�:</span></td><td> The name of the entity
608</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>�:</span></td><td> The public ID of the entity
609</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>�:</span></td><td> The system ID of the entity
610</td></tr><tr><td><span class="term"><i><tt>notationName</tt></i>�:</span></td><td> the name of the notation
611</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="setDocumentLocatorSAXFunc"></a>setDocumentLocatorSAXFunc ()</h3><pre class="programlisting">void        (*setDocumentLocatorSAXFunc)    (void *ctx,
612                                             <a href="libxml-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc);</pre><p>
613Receive the document locator at startup, actually xmlDefaultSAXLocator.
614Everything is available on the context, so this is useless in our case.</p><p>
615
616</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
617</td></tr><tr><td><span class="term"><i><tt>loc</tt></i>�:</span></td><td> A SAX Locator
618</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="startDocumentSAXFunc"></a>startDocumentSAXFunc ()</h3><pre class="programlisting">void        (*startDocumentSAXFunc)         (void *ctx);</pre><p>
619Called when the document start being processed.</p><p>
620
621</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
622</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="endDocumentSAXFunc"></a>endDocumentSAXFunc ()</h3><pre class="programlisting">void        (*endDocumentSAXFunc)           (void *ctx);</pre><p>
623Called when the document end has been detected.</p><p>
624
625</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
626</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="startElementSAXFunc"></a>startElementSAXFunc ()</h3><pre class="programlisting">void        (*startElementSAXFunc)          (void *ctx,
627                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name,
628                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> **atts);</pre><p>
629Called when an opening tag has been processed.</p><p>
630
631</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
632</td></tr><tr><td><span class="term"><i><tt>name</tt></i>�:</span></td><td>  The element name, including namespace prefix
633</td></tr><tr><td><span class="term"><i><tt>atts</tt></i>�:</span></td><td>  An array of name/value attributes pairs, NULL terminated
634</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="endElementSAXFunc"></a>endElementSAXFunc ()</h3><pre class="programlisting">void        (*endElementSAXFunc)            (void *ctx,
635                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);</pre><p>
636Called when the end of an element has been detected.</p><p>
637
638</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
639</td></tr><tr><td><span class="term"><i><tt>name</tt></i>�:</span></td><td>  The element name
640</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="attributeSAXFunc"></a>attributeSAXFunc ()</h3><pre class="programlisting">void        (*attributeSAXFunc)             (void *ctx,
641                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name,
642                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value);</pre><p>
643Handle an attribute that has been read by the parser.
644The default handling is to convert the attribute into an
645DOM subtree and past it in a new xmlAttr element added to
646the element.</p><p>
647
648</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
649</td></tr><tr><td><span class="term"><i><tt>name</tt></i>�:</span></td><td>  The attribute name, including namespace prefix
650</td></tr><tr><td><span class="term"><i><tt>value</tt></i>�:</span></td><td>  The attribute value
651</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="referenceSAXFunc"></a>referenceSAXFunc ()</h3><pre class="programlisting">void        (*referenceSAXFunc)             (void *ctx,
652                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);</pre><p>
653Called when an entity reference is detected.</p><p>
654
655</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
656</td></tr><tr><td><span class="term"><i><tt>name</tt></i>�:</span></td><td>  The entity name
657</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="charactersSAXFunc"></a>charactersSAXFunc ()</h3><pre class="programlisting">void        (*charactersSAXFunc)            (void *ctx,
658                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ch,
659                                             int len);</pre><p>
660Receiving some chars from the parser.</p><p>
661
662</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
663</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>�:</span></td><td>  a xmlChar string
664</td></tr><tr><td><span class="term"><i><tt>len</tt></i>�:</span></td><td> the number of xmlChar
665</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="ignorableWhitespaceSAXFunc"></a>ignorableWhitespaceSAXFunc ()</h3><pre class="programlisting">void        (*ignorableWhitespaceSAXFunc)   (void *ctx,
666                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ch,
667                                             int len);</pre><p>
668Receiving some ignorable whitespaces from the parser.
669UNUSED: by default the DOM building will use characters.</p><p>
670
671</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
672</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>�:</span></td><td>  a xmlChar string
673</td></tr><tr><td><span class="term"><i><tt>len</tt></i>�:</span></td><td> the number of xmlChar
674</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="processingInstructionSAXFunc"></a>processingInstructionSAXFunc ()</h3><pre class="programlisting">void        (*processingInstructionSAXFunc) (void *ctx,
675                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *target,
676                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *data);</pre><p>
677A processing instruction has been parsed.</p><p>
678
679</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
680</td></tr><tr><td><span class="term"><i><tt>target</tt></i>�:</span></td><td>  the target name
681</td></tr><tr><td><span class="term"><i><tt>data</tt></i>�:</span></td><td> the PI data's
682</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="commentSAXFunc"></a>commentSAXFunc ()</h3><pre class="programlisting">void        (*commentSAXFunc)               (void *ctx,
683                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value);</pre><p>
684A comment has been parsed.</p><p>
685
686</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
687</td></tr><tr><td><span class="term"><i><tt>value</tt></i>�:</span></td><td>  the comment content
688</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="cdataBlockSAXFunc"></a>cdataBlockSAXFunc ()</h3><pre class="programlisting">void        (*cdataBlockSAXFunc)            (void *ctx,
689                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value,
690                                             int len);</pre><p>
691Called when a pcdata block has been parsed.</p><p>
692
693</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
694</td></tr><tr><td><span class="term"><i><tt>value</tt></i>�:</span></td><td>  The pcdata content
695</td></tr><tr><td><span class="term"><i><tt>len</tt></i>�:</span></td><td>  the block length
696</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="warningSAXFunc"></a>warningSAXFunc ()</h3><pre class="programlisting">void        (*warningSAXFunc)               (void *ctx,
697                                             const char *msg,
698                                             ...);</pre><p>
699Display and format a warning messages, callback.</p><p>
700
701</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  an XML parser context
702</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>�:</span></td><td>  the message to display/transmit
703</td></tr><tr><td><span class="term"><i><tt>...</tt></i>�:</span></td><td>  extra parameters for the message display
704</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="errorSAXFunc"></a>errorSAXFunc ()</h3><pre class="programlisting">void        (*errorSAXFunc)                 (void *ctx,
705                                             const char *msg,
706                                             ...);</pre><p>
707Display and format an error messages, callback.</p><p>
708
709</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  an XML parser context
710</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>�:</span></td><td>  the message to display/transmit
711</td></tr><tr><td><span class="term"><i><tt>...</tt></i>�:</span></td><td>  extra parameters for the message display
712</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="fatalErrorSAXFunc"></a>fatalErrorSAXFunc ()</h3><pre class="programlisting">void        (*fatalErrorSAXFunc)            (void *ctx,
713                                             const char *msg,
714                                             ...);</pre><p>
715Display and format fatal error messages, callback.
716Note: so far <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="fatalError">fatalError</GTKDOCLINK>() SAX callbacks are not used, <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="error">error</GTKDOCLINK>()
717      get all the callbacks for errors.</p><p>
718
719</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  an XML parser context
720</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>�:</span></td><td>  the message to display/transmit
721</td></tr><tr><td><span class="term"><i><tt>...</tt></i>�:</span></td><td>  extra parameters for the message display
722</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="isStandaloneSAXFunc"></a>isStandaloneSAXFunc ()</h3><pre class="programlisting">int         (*isStandaloneSAXFunc)          (void *ctx);</pre><p>
723Is this document tagged standalone?</p><p>
724
725</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
726</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if true
727</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="hasInternalSubsetSAXFunc"></a>hasInternalSubsetSAXFunc ()</h3><pre class="programlisting">int         (*hasInternalSubsetSAXFunc)     (void *ctx);</pre><p>
728Does this document has an internal subset.</p><p>
729
730</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
731</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if true
732</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="hasExternalSubsetSAXFunc"></a>hasExternalSubsetSAXFunc ()</h3><pre class="programlisting">int         (*hasExternalSubsetSAXFunc)     (void *ctx);</pre><p>
733Does this document has an external subset?</p><p>
734
735</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the user data (XML parser context)
736</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if true
737</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSAXHandler"></a>struct xmlSAXHandler</h3><pre class="programlisting">struct xmlSAXHandler {
738    internalSubsetSAXFunc internalSubset;
739    isStandaloneSAXFunc isStandalone;
740    hasInternalSubsetSAXFunc hasInternalSubset;
741    hasExternalSubsetSAXFunc hasExternalSubset;
742    resolveEntitySAXFunc resolveEntity;
743    getEntitySAXFunc getEntity;
744    entityDeclSAXFunc entityDecl;
745    notationDeclSAXFunc notationDecl;
746    attributeDeclSAXFunc attributeDecl;
747    elementDeclSAXFunc elementDecl;
748    unparsedEntityDeclSAXFunc unparsedEntityDecl;
749    setDocumentLocatorSAXFunc setDocumentLocator;
750    startDocumentSAXFunc startDocument;
751    endDocumentSAXFunc endDocument;
752    startElementSAXFunc startElement;
753    endElementSAXFunc endElement;
754    referenceSAXFunc reference;
755    charactersSAXFunc characters;
756    ignorableWhitespaceSAXFunc ignorableWhitespace;
757    processingInstructionSAXFunc processingInstruction;
758    commentSAXFunc comment;
759    warningSAXFunc warning;
760    errorSAXFunc error;
761    fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
762    getParameterEntitySAXFunc getParameterEntity;
763    cdataBlockSAXFunc cdataBlock;
764    externalSubsetSAXFunc externalSubset;
765    int initialized;
766};
767</pre><p>
768A SAX handler is bunch of callbacks called by the parser when processing
769of the input generate data or structure informations.</p><p>
770
771</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlExternalEntityLoader"></a>xmlExternalEntityLoader ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> (*xmlExternalEntityLoader)
772                                            (const char *URL,
773                                             const char *ID,
774                                             <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> context);</pre><p>
775External entity loaders types.</p><p>
776
777</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>URL</tt></i>�:</span></td><td> The System ID of the resource requested
778</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>�:</span></td><td> The Public ID of the resource requested
779</td></tr><tr><td><span class="term"><i><tt>context</tt></i>�:</span></td><td> the XML parser context 
780</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the entity input parser.
781</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlInitParser"></a>xmlInitParser ()</h3><pre class="programlisting">void        xmlInitParser                   (void);</pre><p>
782Initialization function for the XML parser.
783This is not reentrant. Call once before processing in case of
784use in multithreaded programs.</p><p>
785
786</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCleanupParser"></a>xmlCleanupParser ()</h3><pre class="programlisting">void        xmlCleanupParser                (void);</pre><p>
787Cleanup function for the XML parser. It tries to reclaim all
788parsing related global memory allocated for the parser processing.
789It doesn't deallocate any document related memory. Calling this
790function should not prevent reusing the parser.
791One should call <a href="libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a>() only when the process has
792finished using the library or XML document built with it.</p><p>
793
794</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserInputRead"></a>xmlParserInputRead ()</h3><pre class="programlisting">int         xmlParserInputRead              (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> in,
795                                             int len);</pre><p>
796This function refresh the input for the parser. It doesn't try to
797preserve pointers to the input buffer, and discard already read data</p><p>
798
799</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>in</tt></i>�:</span></td><td>  an XML parser input
800</td></tr><tr><td><span class="term"><i><tt>len</tt></i>�:</span></td><td>  an indicative size for the lookahead
801</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of xmlChars read, or -1 in case of error, 0 indicate the
802end of this entity
803</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserInputGrow"></a>xmlParserInputGrow ()</h3><pre class="programlisting">int         xmlParserInputGrow              (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> in,
804                                             int len);</pre><p>
805This function increase the input for the parser. It tries to
806preserve pointers to the input buffer, and keep already read data</p><p>
807
808</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>in</tt></i>�:</span></td><td>  an XML parser input
809</td></tr><tr><td><span class="term"><i><tt>len</tt></i>�:</span></td><td>  an indicative size for the lookahead
810</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of xmlChars read, or -1 in case of error, 0 indicate the
811end of this entity
812</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlStrdup"></a>xmlStrdup ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlStrdup                       (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *cur);</pre><p>
813a strdup for array of xmlChar's. Since they are supposed to be
814encoded in UTF-8 or an encoding with 8bit based chars, we assume
815a termination mark of '0'.</p><p>
816
817</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>cur</tt></i>�:</span></td><td>  the input xmlChar *
818</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a new xmlChar * or NULL
819</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlStrndup"></a>xmlStrndup ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlStrndup                      (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *cur,
820                                             int len);</pre><p>
821a strndup for array of xmlChar's</p><p>
822
823</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>cur</tt></i>�:</span></td><td>  the input xmlChar *
824</td></tr><tr><td><span class="term"><i><tt>len</tt></i>�:</span></td><td>  the len of <i><tt>cur</tt></i>
825</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a new xmlChar * or NULL
826</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCharStrndup"></a>xmlCharStrndup ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlCharStrndup                  (const char *cur,
827                                             int len);</pre><p>
828a strndup for char's to xmlChar's</p><p>
829
830</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>cur</tt></i>�:</span></td><td>  the input char *
831</td></tr><tr><td><span class="term"><i><tt>len</tt></i>�:</span></td><td>  the len of <i><tt>cur</tt></i>
832</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a new xmlChar * or NULL
833</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCharStrdup"></a>xmlCharStrdup ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlCharStrdup                   (const char *cur);</pre><p>
834a strdup for char's to xmlChar's</p><p>
835
836</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>cur</tt></i>�:</span></td><td>  the input char *
837</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a new xmlChar * or NULL
838</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlStrsub"></a>xmlStrsub ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlStrsub                       (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str,
839                                             int start,
840                                             int len);</pre><p>
841Extract a substring of a given string</p><p>
842
843</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str</tt></i>�:</span></td><td>  the xmlChar * array (haystack)
844</td></tr><tr><td><span class="term"><i><tt>start</tt></i>�:</span></td><td>  the index of the first char (zero based)
845</td></tr><tr><td><span class="term"><i><tt>len</tt></i>�:</span></td><td>  the length of the substring
846</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlChar * for the first occurrence or NULL.
847</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlStrchr"></a>xmlStrchr ()</h3><pre class="programlisting">const <a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlStrchr                    (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str,
848                                             <a href="libxml-tree.html#xmlChar">xmlChar</a> val);</pre><p>
849a strchr for xmlChar's</p><p>
850
851</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str</tt></i>�:</span></td><td>  the xmlChar * array
852</td></tr><tr><td><span class="term"><i><tt>val</tt></i>�:</span></td><td>  the xmlChar to search
853</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlChar * for the first occurrence or NULL.
854</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlStrstr"></a>xmlStrstr ()</h3><pre class="programlisting">const <a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlStrstr                    (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str,
855                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *val);</pre><p>
856a strstr for xmlChar's</p><p>
857
858</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str</tt></i>�:</span></td><td>  the xmlChar * array (haystack)
859</td></tr><tr><td><span class="term"><i><tt>val</tt></i>�:</span></td><td>  the xmlChar to search (needle)
860</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlChar * for the first occurrence or NULL.
861</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlStrcasestr"></a>xmlStrcasestr ()</h3><pre class="programlisting">const <a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlStrcasestr                (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str,
862                                             <a href="libxml-tree.html#xmlChar">xmlChar</a> *val);</pre><p>
863a case-ignoring strstr for xmlChar's</p><p>
864
865</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str</tt></i>�:</span></td><td>  the xmlChar * array (haystack)
866</td></tr><tr><td><span class="term"><i><tt>val</tt></i>�:</span></td><td>  the xmlChar to search (needle)
867</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlChar * for the first occurrence or NULL.
868</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlStrcmp"></a>xmlStrcmp ()</h3><pre class="programlisting">int         xmlStrcmp                       (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str1,
869                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str2);</pre><p>
870a strcmp for xmlChar's</p><p>
871
872</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str1</tt></i>�:</span></td><td>  the first xmlChar *
873</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>�:</span></td><td>  the second xmlChar *
874</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the integer result of the comparison
875</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlStrncmp"></a>xmlStrncmp ()</h3><pre class="programlisting">int         xmlStrncmp                      (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str1,
876                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str2,
877                                             int len);</pre><p>
878a strncmp for xmlChar's</p><p>
879
880</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str1</tt></i>�:</span></td><td>  the first xmlChar *
881</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>�:</span></td><td>  the second xmlChar *
882</td></tr><tr><td><span class="term"><i><tt>len</tt></i>�:</span></td><td>  the max comparison length
883</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the integer result of the comparison
884</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlStrcasecmp"></a>xmlStrcasecmp ()</h3><pre class="programlisting">int         xmlStrcasecmp                   (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str1,
885                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str2);</pre><p>
886a strcasecmp for xmlChar's</p><p>
887
888</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str1</tt></i>�:</span></td><td>  the first xmlChar *
889</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>�:</span></td><td>  the second xmlChar *
890</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the integer result of the comparison
891</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlStrncasecmp"></a>xmlStrncasecmp ()</h3><pre class="programlisting">int         xmlStrncasecmp                  (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str1,
892                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str2,
893                                             int len);</pre><p>
894a strncasecmp for xmlChar's</p><p>
895
896</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str1</tt></i>�:</span></td><td>  the first xmlChar *
897</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>�:</span></td><td>  the second xmlChar *
898</td></tr><tr><td><span class="term"><i><tt>len</tt></i>�:</span></td><td>  the max comparison length
899</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the integer result of the comparison
900</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlStrEqual"></a>xmlStrEqual ()</h3><pre class="programlisting">int         xmlStrEqual                     (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str1,
901                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str2);</pre><p>
902Check if both string are equal of have same content
903Should be a bit more readable and faster than <a href="libxml-parser.html#xmlStrEqual">xmlStrEqual</a>()</p><p>
904
905</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str1</tt></i>�:</span></td><td>  the first xmlChar *
906</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>�:</span></td><td>  the second xmlChar *
907</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if they are equal, 0 if they are different
908</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlStrlen"></a>xmlStrlen ()</h3><pre class="programlisting">int         xmlStrlen                       (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str);</pre><p>
909length of a xmlChar's string</p><p>
910
911</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str</tt></i>�:</span></td><td>  the xmlChar * array
912</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of xmlChar contained in the ARRAY.
913</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlStrcat"></a>xmlStrcat ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlStrcat                       (<a href="libxml-tree.html#xmlChar">xmlChar</a> *cur,
914                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *add);</pre><p>
915a strcat for array of xmlChar's. Since they are supposed to be
916encoded in UTF-8 or an encoding with 8bit based chars, we assume
917a termination mark of '0'.</p><p>
918
919</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>cur</tt></i>�:</span></td><td>  the original xmlChar * array
920</td></tr><tr><td><span class="term"><i><tt>add</tt></i>�:</span></td><td>  the xmlChar * array added
921</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a new xmlChar * containing the concatenated string.
922</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlStrncat"></a>xmlStrncat ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>*    xmlStrncat                      (<a href="libxml-tree.html#xmlChar">xmlChar</a> *cur,
923                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *add,
924                                             int len);</pre><p>
925a strncat for array of xmlChar's, it will extend <i><tt>cur</tt></i> with the len
926first bytes of <i><tt>add</tt></i>.</p><p>
927
928</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>cur</tt></i>�:</span></td><td>  the original xmlChar * array
929</td></tr><tr><td><span class="term"><i><tt>add</tt></i>�:</span></td><td>  the xmlChar * array added
930</td></tr><tr><td><span class="term"><i><tt>len</tt></i>�:</span></td><td>  the length of <i><tt>add</tt></i>
931</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a new xmlChar *, the original <i><tt>cur</tt></i> is reallocated if needed
932and should not be freed
933</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParseDoc"></a>xmlParseDoc ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   xmlParseDoc                     (<a href="libxml-tree.html#xmlChar">xmlChar</a> *cur);</pre><p>
934parse an XML in-memory document and build a tree.</p><p>
935
936</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>cur</tt></i>�:</span></td><td>  a pointer to an array of xmlChar
937</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the resulting document tree
938</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParseMemory"></a>xmlParseMemory ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   xmlParseMemory                  (const char *buffer,
939                                             int size);</pre><p>
940parse an XML in-memory block and build a tree.</p><p>
941
942</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>�:</span></td><td>  an pointer to a char array
943</td></tr><tr><td><span class="term"><i><tt>size</tt></i>�:</span></td><td>  the size of the array
944</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the resulting document tree
945</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParseFile"></a>xmlParseFile ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   xmlParseFile                    (const char *filename);</pre><p>
946parse an XML file and build a tree. Automatic support for ZLIB/Compress
947compressed document is provided by default if found at compile-time.</p><p>
948
949</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>filename</tt></i>�:</span></td><td>  the filename
950</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the resulting document tree if the file was wellformed,
951NULL otherwise.
952</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSubstituteEntitiesDefault"></a>xmlSubstituteEntitiesDefault ()</h3><pre class="programlisting">int         xmlSubstituteEntitiesDefault    (int val);</pre><p>
953Set and return the previous value for default entity support.
954Initially the parser always keep entity references instead of substituting
955entity values in the output. This function has to be used to change the
956default parser behavior
957SAX::<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="substituteEntities">substituteEntities</GTKDOCLINK>() has to be used for changing that on a file by
958file basis.</p><p>
959
960</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i>�:</span></td><td>  int 0 or 1 
961</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the last value for 0 for no substitution, 1 for substitution.
962</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlKeepBlanksDefault"></a>xmlKeepBlanksDefault ()</h3><pre class="programlisting">int         xmlKeepBlanksDefault            (int val);</pre><p>
963Set and return the previous value for default blanks text nodes support.
964The 1.x version of the parser used an heuristic to try to detect
965ignorable white spaces. As a result the SAX callback was generating
966<a href="libxml-SAX.html#ignorableWhitespace">ignorableWhitespace</a>() callbacks instead of <a href="libxml-SAX.html#characters">characters</a>() one, and when
967using the DOM output text nodes containing those blanks were not generated.
968The 2.x and later version will switch to the XML standard way and
969<a href="libxml-SAX.html#ignorableWhitespace">ignorableWhitespace</a>() are only generated when running the parser in
970validating mode and when the current element doesn't allow CDATA or
971mixed content.
972This function is provided as a way to force the standard behavior 
973on 1.X libs and to switch back to the old mode for compatibility when
974running 1.X client code on 2.X . Upgrade of 1.X code should be done
975by using <a href="libxml-tree.html#xmlIsBlankNode">xmlIsBlankNode</a>() commodity function to detect the "empty"
976nodes generated.
977This value also affect autogeneration of indentation when saving code
978if blanks sections are kept, indentation is not generated.</p><p>
979
980</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i>�:</span></td><td>  int 0 or 1 
981</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the last value for 0 for no substitution, 1 for substitution.
982</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlStopParser"></a>xmlStopParser ()</h3><pre class="programlisting">void        xmlStopParser                   (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);</pre><p>
983Blocks further parser processing</p><p>
984
985</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>�:</span></td><td>  an XML parser context
986</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlPedanticParserDefault"></a>xmlPedanticParserDefault ()</h3><pre class="programlisting">int         xmlPedanticParserDefault        (int val);</pre><p>
987Set and return the previous value for enabling pedantic warnings.</p><p>
988
989</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i>�:</span></td><td>  int 0 or 1 
990</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the last value for 0 for no substitution, 1 for substitution.
991</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlLineNumbersDefault"></a>xmlLineNumbersDefault ()</h3><pre class="programlisting">int         xmlLineNumbersDefault           (int val);</pre><p>
992Set and return the previous value for enabling line numbers in elements
993contents. This may break on old application and is turned off by default.</p><p>
994
995</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i>�:</span></td><td>  int 0 or 1 
996</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the last value for 0 for no substitution, 1 for substitution.
997</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRecoverDoc"></a>xmlRecoverDoc ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   xmlRecoverDoc                   (<a href="libxml-tree.html#xmlChar">xmlChar</a> *cur);</pre><p>
998parse an XML in-memory document and build a tree.
999In the case the document is not Well Formed, a tree is built anyway</p><p>
1000
1001</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>cur</tt></i>�:</span></td><td>  a pointer to an array of xmlChar
1002</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the resulting document tree
1003</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRecoverMemory"></a>xmlRecoverMemory ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   xmlRecoverMemory                (const char *buffer,
1004                                             int size);</pre><p>
1005parse an XML in-memory block and build a tree.
1006In the case the document is not Well Formed, a tree is built anyway</p><p>
1007
1008</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>�:</span></td><td>  an pointer to a char array
1009</td></tr><tr><td><span class="term"><i><tt>size</tt></i>�:</span></td><td>  the size of the array
1010</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the resulting document tree
1011</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRecoverFile"></a>xmlRecoverFile ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   xmlRecoverFile                  (const char *filename);</pre><p>
1012parse an XML file and build a tree. Automatic support for ZLIB/Compress
1013compressed document is provided by default if found at compile-time.
1014In the case the document is not Well Formed, a tree is built anyway</p><p>
1015
1016</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>filename</tt></i>�:</span></td><td>  the filename
1017</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the resulting document tree
1018</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParseDocument"></a>xmlParseDocument ()</h3><pre class="programlisting">int         xmlParseDocument                (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);</pre><p>
1019parse an XML document (and build a tree if using the standard SAX
1020interface).
1021</p><p>
1022[1] document ::= prolog element Misc*
1023</p><p>
1024[22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?</p><p>
1025
1026</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>�:</span></td><td>  an XML parser context
1027</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0, -1 in case of error. the parser context is augmented
1028               as a result of the parsing.
1029</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParseExtParsedEnt"></a>xmlParseExtParsedEnt ()</h3><pre class="programlisting">int         xmlParseExtParsedEnt            (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);</pre><p>
1030parse a general parsed entity
1031An external general parsed entity is well-formed if it matches the
1032production labeled extParsedEnt.
1033</p><p>
1034[78] extParsedEnt ::= TextDecl? content</p><p>
1035
1036</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>�:</span></td><td>  an XML parser context
1037</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0, -1 in case of error. the parser context is augmented
1038               as a result of the parsing.
1039</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSAXParseDoc"></a>xmlSAXParseDoc ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   xmlSAXParseDoc                  (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
1040                                             <a href="libxml-tree.html#xmlChar">xmlChar</a> *cur,
1041                                             int recovery);</pre><p>
1042parse an XML in-memory document and build a tree.
1043It use the given SAX function block to handle the parsing callback.
1044If sax is NULL, fallback to the default DOM tree building routines.</p><p>
1045
1046</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>sax</tt></i>�:</span></td><td>  the SAX handler block
1047</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>�:</span></td><td>  a pointer to an array of xmlChar
1048</td></tr><tr><td><span class="term"><i><tt>recovery</tt></i>�:</span></td><td>  work in recovery mode, i.e. tries to read no Well Formed
1049            documents
1050</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the resulting document tree
1051</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSAXUserParseFile"></a>xmlSAXUserParseFile ()</h3><pre class="programlisting">int         xmlSAXUserParseFile             (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
1052                                             void *user_data,
1053                                             const char *filename);</pre><p>
1054parse an XML file and call the given SAX handler routines.
1055Automatic support for ZLIB/Compress compressed document is provided</p><p>
1056
1057</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>sax</tt></i>�:</span></td><td>  a SAX handler
1058</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>�:</span></td><td>  The user data returned on SAX callbacks
1059</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>�:</span></td><td>  a file name
1060</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 in case of success or a error number otherwise
1061</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSAXUserParseMemory"></a>xmlSAXUserParseMemory ()</h3><pre class="programlisting">int         xmlSAXUserParseMemory           (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
1062                                             void *user_data,
1063                                             const char *buffer,
1064                                             int size);</pre><p>
1065A better SAX parsing routine.
1066parse an XML in-memory buffer and call the given SAX handler routines.</p><p>
1067
1068</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>sax</tt></i>�:</span></td><td>  a SAX handler
1069</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>�:</span></td><td>  The user data returned on SAX callbacks
1070</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>�:</span></td><td>  an in-memory XML document input
1071</td></tr><tr><td><span class="term"><i><tt>size</tt></i>�:</span></td><td>  the length of the XML document in bytes
1072</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 in case of success or a error number otherwise
1073</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSAXParseMemory"></a>xmlSAXParseMemory ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   xmlSAXParseMemory               (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
1074                                             const char *buffer,
1075                                             int size,
1076                                             int recovery);</pre><p>
1077parse an XML in-memory block and use the given SAX function block
1078to handle the parsing callback. If sax is NULL, fallback to the default
1079DOM tree building routines.</p><p>
1080
1081</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>sax</tt></i>�:</span></td><td>  the SAX handler block
1082</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>�:</span></td><td>  an pointer to a char array
1083</td></tr><tr><td><span class="term"><i><tt>size</tt></i>�:</span></td><td>  the size of the array
1084</td></tr><tr><td><span class="term"><i><tt>recovery</tt></i>�:</span></td><td>  work in recovery mode, i.e. tries to read not Well Formed
1085            documents
1086</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the resulting document tree
1087</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSAXParseMemoryWithData"></a>xmlSAXParseMemoryWithData ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   xmlSAXParseMemoryWithData       (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
1088                                             const char *buffer,
1089                                             int size,
1090                                             int recovery,
1091                                             void *data);</pre><p>
1092parse an XML in-memory block and use the given SAX function block
1093to handle the parsing callback. If sax is NULL, fallback to the default
1094DOM tree building routines.
1095</p><p>
1096User data (void *) is stored within the parser context in the
1097context's _private member, so it is available nearly everywhere in libxml</p><p>
1098
1099</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>sax</tt></i>�:</span></td><td>  the SAX handler block
1100</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>�:</span></td><td>  an pointer to a char array
1101</td></tr><tr><td><span class="term"><i><tt>size</tt></i>�:</span></td><td>  the size of the array
1102</td></tr><tr><td><span class="term"><i><tt>recovery</tt></i>�:</span></td><td>  work in recovery mode, i.e. tries to read no Well Formed
1103            documents
1104</td></tr><tr><td><span class="term"><i><tt>data</tt></i>�:</span></td><td>  the userdata
1105</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the resulting document tree
1106</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSAXParseFile"></a>xmlSAXParseFile ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   xmlSAXParseFile                 (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
1107                                             const char *filename,
1108                                             int recovery);</pre><p>
1109parse an XML file and build a tree. Automatic support for ZLIB/Compress
1110compressed document is provided by default if found at compile-time.
1111It use the given SAX function block to handle the parsing callback.
1112If sax is NULL, fallback to the default DOM tree building routines.</p><p>
1113
1114</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>sax</tt></i>�:</span></td><td>  the SAX handler block
1115</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>�:</span></td><td>  the filename
1116</td></tr><tr><td><span class="term"><i><tt>recovery</tt></i>�:</span></td><td>  work in recovery mode, i.e. tries to read no Well Formed
1117            documents
1118</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the resulting document tree
1119</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSAXParseFileWithData"></a>xmlSAXParseFileWithData ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   xmlSAXParseFileWithData         (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
1120                                             const char *filename,
1121                                             int recovery,
1122                                             void *data);</pre><p>
1123parse an XML file and build a tree. Automatic support for ZLIB/Compress
1124compressed document is provided by default if found at compile-time.
1125It use the given SAX function block to handle the parsing callback.
1126If sax is NULL, fallback to the default DOM tree building routines.
1127</p><p>
1128User data (void *) is stored within the parser context in the
1129context's _private member, so it is available nearly everywhere in libxml</p><p>
1130
1131</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>sax</tt></i>�:</span></td><td>  the SAX handler block
1132</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>�:</span></td><td>  the filename
1133</td></tr><tr><td><span class="term"><i><tt>recovery</tt></i>�:</span></td><td>  work in recovery mode, i.e. tries to read no Well Formed
1134            documents
1135</td></tr><tr><td><span class="term"><i><tt>data</tt></i>�:</span></td><td>  the userdata
1136</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the resulting document tree
1137</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSAXParseEntity"></a>xmlSAXParseEntity ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   xmlSAXParseEntity               (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
1138                                             const char *filename);</pre><p>
1139parse an XML external entity out of context and build a tree.
1140It use the given SAX function block to handle the parsing callback.
1141If sax is NULL, fallback to the default DOM tree building routines.
1142</p><p>
1143[78] extParsedEnt ::= TextDecl? content
1144</p><p>
1145This correspond to a "Well Balanced" chunk</p><p>
1146
1147</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>sax</tt></i>�:</span></td><td>  the SAX handler block
1148</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>�:</span></td><td>  the filename
1149</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the resulting document tree
1150</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParseEntity"></a>xmlParseEntity ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>   xmlParseEntity                  (const char *filename);</pre><p>
1151parse an XML external entity out of context and build a tree.
1152</p><p>
1153[78] extParsedEnt ::= TextDecl? content
1154</p><p>
1155This correspond to a "Well Balanced" chunk</p><p>
1156
1157</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>filename</tt></i>�:</span></td><td>  the filename
1158</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the resulting document tree
1159</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParseDTD"></a>xmlParseDTD ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a>   xmlParseDTD                     (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ExternalID,
1160                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *SystemID);</pre><p>
1161Load and parse an external subset.</p><p>
1162
1163</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ExternalID</tt></i>�:</span></td><td>  a NAME* containing the External ID of the DTD
1164</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>�:</span></td><td>  a NAME* containing the URL to the DTD
1165</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the resulting xmlDtdPtr or NULL in case of error.
1166</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSAXParseDTD"></a>xmlSAXParseDTD ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a>   xmlSAXParseDTD                  (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
1167                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ExternalID,
1168                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *SystemID);</pre><p>
1169Load and parse an external subset.</p><p>
1170
1171</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>sax</tt></i>�:</span></td><td>  the SAX handler block
1172</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>�:</span></td><td>  a NAME* containing the External ID of the DTD
1173</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>�:</span></td><td>  a NAME* containing the URL to the DTD
1174</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the resulting xmlDtdPtr or NULL in case of error.
1175</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlIOParseDTD"></a>xmlIOParseDTD ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a>   xmlIOParseDTD                   (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
1176                                             <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input,
1177                                             <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);</pre><p>
1178Load and parse a DTD</p><p>
1179
1180</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>sax</tt></i>�:</span></td><td>  the SAX handler block or NULL
1181</td></tr><tr><td><span class="term"><i><tt>input</tt></i>�:</span></td><td>  an Input Buffer
1182</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>�:</span></td><td>  the charset encoding if known
1183</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the resulting xmlDtdPtr or NULL in case of error.
1184<i><tt>input</tt></i> will be freed at parsing end.
1185</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParseBalancedChunkMemory"></a>xmlParseBalancedChunkMemory ()</h3><pre class="programlisting">int         xmlParseBalancedChunkMemory     (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
1186                                             <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
1187                                             void *user_data,
1188                                             int depth,
1189                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *string,
1190                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> *lst);</pre><p>
1191Parse a well-balanced chunk of an XML document
1192called by the parser
1193The allowed sequence for the Well Balanced Chunk is the one defined by
1194the content production in the XML grammar:
1195</p><p>
1196[43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*</p><p>
1197
1198</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i>�:</span></td><td>  the document the chunk pertains to
1199</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>�:</span></td><td>  the SAX handler bloc (possibly NULL)
1200</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>�:</span></td><td>  The user data returned on SAX callbacks (possibly NULL)
1201</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>�:</span></td><td>  Used for loop detection, use 0
1202</td></tr><tr><td><span class="term"><i><tt>string</tt></i>�:</span></td><td>  the input string in UTF8 or ISO-Latin (zero terminated)
1203</td></tr><tr><td><span class="term"><i><tt>lst</tt></i>�:</span></td><td>  the return value for the set of parsed nodes
1204</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 if the chunk is well balanced, -1 in case of args problem and
1205   the parser error code otherwise
1206</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParseBalancedChunkMemoryRecover"></a>xmlParseBalancedChunkMemoryRecover ()</h3><pre class="programlisting">int         xmlParseBalancedChunkMemoryRecover
1207                                            (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
1208                                             <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
1209                                             void *user_data,
1210                                             int depth,
1211                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *string,
1212                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> *lst,
1213                                             int recover);</pre><p>
1214Parse a well-balanced chunk of an XML document
1215called by the parser
1216The allowed sequence for the Well Balanced Chunk is the one defined by
1217the content production in the XML grammar:
1218</p><p>
1219[43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*</p><p>
1220
1221</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i>�:</span></td><td>  the document the chunk pertains to
1222</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>�:</span></td><td>  the SAX handler bloc (possibly NULL)
1223</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>�:</span></td><td>  The user data returned on SAX callbacks (possibly NULL)
1224</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>�:</span></td><td>  Used for loop detection, use 0
1225</td></tr><tr><td><span class="term"><i><tt>string</tt></i>�:</span></td><td>  the input string in UTF8 or ISO-Latin (zero terminated)
1226</td></tr><tr><td><span class="term"><i><tt>lst</tt></i>�:</span></td><td>  the return value for the set of parsed nodes
1227</td></tr><tr><td><span class="term"><i><tt>recover</tt></i>�:</span></td><td> return nodes even if the data is broken (use 0)
1228</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 if the chunk is well balanced, -1 in case of args problem and
1229   the parser error code otherwise
1230   
1231In case recover is set to 1, the nodelist will not be empty even if
1232the parsed chunk is not well balanced. 
1233</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParseExternalEntity"></a>xmlParseExternalEntity ()</h3><pre class="programlisting">int         xmlParseExternalEntity          (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
1234                                             <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
1235                                             void *user_data,
1236                                             int depth,
1237                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *URL,
1238                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ID,
1239                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> *lst);</pre><p>
1240Parse an external general entity
1241An external general parsed entity is well-formed if it matches the
1242production labeled extParsedEnt.
1243</p><p>
1244[78] extParsedEnt ::= TextDecl? content</p><p>
1245
1246</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i>�:</span></td><td>  the document the chunk pertains to
1247</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>�:</span></td><td>  the SAX handler bloc (possibly NULL)
1248</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>�:</span></td><td>  The user data returned on SAX callbacks (possibly NULL)
1249</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>�:</span></td><td>  Used for loop detection, use 0
1250</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>�:</span></td><td>  the URL for the entity to load
1251</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>�:</span></td><td>  the System ID for the entity to load
1252</td></tr><tr><td><span class="term"><i><tt>lst</tt></i>�:</span></td><td>  the return value for the set of parsed nodes
1253</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 if the entity is well formed, -1 in case of args problem and
1254   the parser error code otherwise
1255</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParseCtxtExternalEntity"></a>xmlParseCtxtExternalEntity ()</h3><pre class="programlisting">int         xmlParseCtxtExternalEntity      (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctx,
1256                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *URL,
1257                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ID,
1258                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> *lst);</pre><p>
1259Parse an external general entity within an existing parsing context
1260An external general parsed entity is well-formed if it matches the
1261production labeled extParsedEnt.
1262</p><p>
1263[78] extParsedEnt ::= TextDecl? content</p><p>
1264
1265</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>�:</span></td><td>  the existing parsing context
1266</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>�:</span></td><td>  the URL for the entity to load
1267</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>�:</span></td><td>  the System ID for the entity to load
1268</td></tr><tr><td><span class="term"><i><tt>lst</tt></i>�:</span></td><td>  the return value for the set of parsed nodes
1269</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 if the entity is well formed, -1 in case of args problem and
1270   the parser error code otherwise
1271</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlInitParserCtxt"></a>xmlInitParserCtxt ()</h3><pre class="programlisting">int         xmlInitParserCtxt               (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);</pre><p>
1272Initialize a parser context</p><p>
1273
1274</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>�:</span></td><td>  an XML parser context
1275</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 in case of success and -1 in case of error
1276</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlClearParserCtxt"></a>xmlClearParserCtxt ()</h3><pre class="programlisting">void        xmlClearParserCtxt              (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);</pre><p>
1277Clear (release owned resources) and reinitialize a parser context</p><p>
1278
1279</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>�:</span></td><td>  an XML parser context
1280</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFreeParserCtxt"></a>xmlFreeParserCtxt ()</h3><pre class="programlisting">void        xmlFreeParserCtxt               (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);</pre><p>
1281Free all the memory used by a parser context. However the parsed
1282document in ctxt-&gt;myDoc is not freed.</p><p>
1283
1284</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>�:</span></td><td>  an XML parser context
1285</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSetupParserForBuffer"></a>xmlSetupParserForBuffer ()</h3><pre class="programlisting">void        xmlSetupParserForBuffer         (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt,
1286                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *buffer,
1287                                             const char *filename);</pre><p>
1288Setup the parser context to parse a new buffer; Clears any prior
1289contents from the parser context. The buffer parameter must not be
1290NULL, but the filename parameter can be</p><p>
1291
1292</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>�:</span></td><td>  an XML parser context
1293</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>�:</span></td><td>  a xmlChar * buffer
1294</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>�:</span></td><td>  a file name
1295</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCreateDocParserCtxt"></a>xmlCreateDocParserCtxt ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlCreateDocParserCtxt     (<a href="libxml-tree.html#xmlChar">xmlChar</a> *cur);</pre><p>
1296Creates a parser context for an XML in-memory document.</p><p>
1297
1298</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>cur</tt></i>�:</span></td><td>  a pointer to an array of xmlChar
1299</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new parser context or NULL
1300</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGetFeaturesList"></a>xmlGetFeaturesList ()</h3><pre class="programlisting">int         xmlGetFeaturesList              (int *len,
1301                                             const char **result);</pre><p>
1302Copy at most *<i><tt>len</tt></i> feature names into the <i><tt>result</tt></i> array</p><p>
1303
1304</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>len</tt></i>�:</span></td><td>  the length of the features name array (input/output)
1305</td></tr><tr><td><span class="term"><i><tt>result</tt></i>�:</span></td><td>  an array of string to be filled with the features name.
1306</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-1 in case or error, or the total number of features,
1307           len is updated with the number of strings copied,
1308           strings must not be deallocated
1309</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGetFeature"></a>xmlGetFeature ()</h3><pre class="programlisting">int         xmlGetFeature                   (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt,
1310                                             const char *name,
1311                                             void *result);</pre><p>
1312Read the current value of one feature of this parser instance</p><p>
1313
1314</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>�:</span></td><td>  an XML/HTML parser context
1315</td></tr><tr><td><span class="term"><i><tt>name</tt></i>�:</span></td><td>  the feature name
1316</td></tr><tr><td><span class="term"><i><tt>result</tt></i>�:</span></td><td>  location to store the result
1317</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-1 in case or error, 0 otherwise
1318</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSetFeature"></a>xmlSetFeature ()</h3><pre class="programlisting">int         xmlSetFeature                   (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt,
1319                                             const char *name,
1320                                             void *value);</pre><p>
1321Change the current value of one feature of this parser instance</p><p>
1322
1323</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>�:</span></td><td>  an XML/HTML parser context
1324</td></tr><tr><td><span class="term"><i><tt>name</tt></i>�:</span></td><td>  the feature name
1325</td></tr><tr><td><span class="term"><i><tt>value</tt></i>�:</span></td><td>  pointer to the location of the new value
1326</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-1 in case or error, 0 otherwise
1327</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCreatePushParserCtxt"></a>xmlCreatePushParserCtxt ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlCreatePushParserCtxt    (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
1328                                             void *user_data,
1329                                             const char *chunk,
1330                                             int size,
1331                                             const char *filename);</pre><p>
1332Create a parser context for using the XML parser in push mode.
1333If <i><tt>buffer</tt></i> and <i><tt>size</tt></i> are non-NULL, the data is used to detect
1334the encoding.  The remaining characters will be parsed so they
1335don't need to be fed in again through xmlParseChunk.
1336To allow content encoding detection, <i><tt>size</tt></i> should be &gt;= 4
1337The value of <i><tt>filename</tt></i> is used for fetching external entities
1338and error/warning reports.</p><p>
1339
1340</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>sax</tt></i>�:</span></td><td>  a SAX handler
1341</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>�:</span></td><td>  The user data returned on SAX callbacks
1342</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>�:</span></td><td>  a pointer to an array of chars
1343</td></tr><tr><td><span class="term"><i><tt>size</tt></i>�:</span></td><td>  number of chars in the array
1344</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>�:</span></td><td>  an optional file name or URI
1345</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new parser context or NULL
1346</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParseChunk"></a>xmlParseChunk ()</h3><pre class="programlisting">int         xmlParseChunk                   (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt,
1347                                             const char *chunk,
1348                                             int size,
1349                                             int terminate);</pre><p>
1350Parse a Chunk of memory</p><p>
1351
1352</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>�:</span></td><td>  an XML parser context
1353</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>�:</span></td><td>  an char array
1354</td></tr><tr><td><span class="term"><i><tt>size</tt></i>�:</span></td><td>  the size in byte of the chunk
1355</td></tr><tr><td><span class="term"><i><tt>terminate</tt></i>�:</span></td><td>  last chunk indicator
1356</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>zero if no error, the xmlParserErrors otherwise.
1357</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCreateIOParserCtxt"></a>xmlCreateIOParserCtxt ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlCreateIOParserCtxt      (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax,
1358                                             void *user_data,
1359                                             <a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread,
1360                                             <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose,
1361                                             void *ioctx,
1362                                             <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);</pre><p>
1363Create a parser context for using the XML parser with an existing
1364I/O stream</p><p>
1365
1366</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>sax</tt></i>�:</span></td><td>  a SAX handler
1367</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>�:</span></td><td>  The user data returned on SAX callbacks
1368</td></tr><tr><td><span class="term"><i><tt>ioread</tt></i>�:</span></td><td>  an I/O read function
1369</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>�:</span></td><td>  an I/O close function
1370</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>�:</span></td><td>  an I/O handler
1371</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>�:</span></td><td>  the charset encoding if known
1372</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new parser context or NULL
1373</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNewIOInputStream"></a>xmlNewIOInputStream ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlNewIOInputStream       (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt,
1374                                             <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input,
1375                                             <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);</pre><p>
1376Create a new input stream structure encapsulating the <i><tt>input</tt></i> into
1377a stream suitable for the parser.</p><p>
1378
1379</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>�:</span></td><td>  an XML parser context
1380</td></tr><tr><td><span class="term"><i><tt>input</tt></i>�:</span></td><td>  an I/O Input
1381</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>�:</span></td><td>  the charset encoding if known
1382</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new input stream or NULL
1383</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserFindNodeInfo"></a>xmlParserFindNodeInfo ()</h3><pre class="programlisting">const <a href="libxml-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a>* xmlParserFindNodeInfo
1384                                            (const <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt,
1385                                             const <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node);</pre><p>
1386Find the parser node info struct for a given node</p><p>
1387
1388</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>�:</span></td><td>
1389</td></tr><tr><td><span class="term"><i><tt>node</tt></i>�:</span></td><td>  an XML node within the tree
1390</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>an xmlParserNodeInfo block pointer or NULL
1391</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlInitNodeInfoSeq"></a>xmlInitNodeInfoSeq ()</h3><pre class="programlisting">void        xmlInitNodeInfoSeq              (<a href="libxml-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq);</pre><p>
1392-- Initialize (set to initial state) node info sequence</p><p>
1393
1394</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>seq</tt></i>�:</span></td><td>  a node info sequence pointer
1395</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlClearNodeInfoSeq"></a>xmlClearNodeInfoSeq ()</h3><pre class="programlisting">void        xmlClearNodeInfoSeq             (<a href="libxml-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq);</pre><p>
1396-- Clear (release memory and reinitialize) node
1397  info sequence</p><p>
1398
1399</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>seq</tt></i>�:</span></td><td>  a node info sequence pointer
1400</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserFindNodeInfoIndex"></a>xmlParserFindNodeInfoIndex ()</h3><pre class="programlisting">unsigned <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="long">long</GTKDOCLINK> xmlParserFindNodeInfoIndex    (const <a href="libxml-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq,
1401                                             const <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node);</pre><p>
1402xmlParserFindNodeInfoIndex : Find the index that the info record for
1403  the given node is or should be at in a sorted sequence</p><p>
1404
1405</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>seq</tt></i>�:</span></td><td>  a node info sequence pointer
1406</td></tr><tr><td><span class="term"><i><tt>node</tt></i>�:</span></td><td>  an XML node pointer
1407</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a long indicating the position of the record
1408</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlParserAddNodeInfo"></a>xmlParserAddNodeInfo ()</h3><pre class="programlisting">void        xmlParserAddNodeInfo            (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt,
1409                                             const <a href="libxml-parser.html#xmlParserNodeInfoPtr">xmlParserNodeInfoPtr</a> info);</pre><p>
1410Insert node info record into the sorted sequence</p><p>
1411
1412</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>�:</span></td><td>  an XML parser context
1413</td></tr><tr><td><span class="term"><i><tt>info</tt></i>�:</span></td><td>  a node info sequence pointer
1414</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSetExternalEntityLoader"></a>xmlSetExternalEntityLoader ()</h3><pre class="programlisting">void        xmlSetExternalEntityLoader      (<a href="libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a> f);</pre><p>
1415Changes the defaultexternal entity resolver function for the application</p><p>
1416
1417</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>f</tt></i>�:</span></td><td>  the new entity resolver function
1418</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGetExternalEntityLoader"></a>xmlGetExternalEntityLoader ()</h3><pre class="programlisting"><a href="libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a> xmlGetExternalEntityLoader
1419                                            (void);</pre><p>
1420Get the default external entity resolver function for the application</p><p>
1421
1422</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlExternalEntityLoader function pointer
1423</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlLoadExternalEntity"></a>xmlLoadExternalEntity ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlLoadExternalEntity     (const char *URL,
1424                                             const char *ID,
1425                                             <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);</pre><p>
1426Load an external entity, note that the use of this function for
1427unparsed entities may generate problems
1428TODO: a more generic External entity API must be designed</p><p>
1429
1430</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>URL</tt></i>�:</span></td><td>  the URL for the entity to load
1431</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>�:</span></td><td>  the Public ID for the entity to load
1432</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>�:</span></td><td>  the context in which the entity is called or NULL
1433</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlParserInputPtr or NULL
1434</td></tr></tbody></table></div></div></div></div><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libxml-lib.html"><b>&lt;&lt;�Libxml Library Reference</b></a></td><td align="right"><a accesskey="n" href="libxml-xmlreader.html"><b>xmlreader�&gt;&gt;</b></a></td></tr></table></body></html>
1435