epoc32/include/stdapis/libxml2/libxml2_xmlreader.h
branchSymbian3
changeset 4 837f303aceeb
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
       
     1 /*
       
     2  * Summary: the XMLReader implementation
       
     3  * Description: API of the XML streaming API based on C# interfaces.
       
     4  *
       
     5  * Copy: See Copyright for the status of this software.
       
     6  *
       
     7  * Author: Daniel Veillard
       
     8  * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. 
       
     9  */
       
    10 
       
    11 /** @file
       
    12 @publishedAll
       
    13 @released
       
    14 */
       
    15 
       
    16 #ifndef XML_XMLREADER_H
       
    17 #define XML_XMLREADER_H
       
    18 
       
    19 #include <libxml2_tree.h>
       
    20 #include <libxml2_xmlio.h>
       
    21 
       
    22 #ifdef LIBXML_SCHEMAS_ENABLED
       
    23 #include "libxml2_relaxng.h"
       
    24 #include "libxml2_xmlschemas.h"
       
    25 #endif
       
    26 
       
    27 // XMLENGINE: This set of header was moved here from .c file
       
    28 
       
    29 #ifdef LIBXML_SCHEMAS_ENABLED
       
    30 #include "libxml2_relaxng.h"
       
    31 #endif
       
    32 
       
    33 #ifdef LIBXML_XINCLUDE_ENABLED
       
    34 #include "libxml2_xinclude.h"
       
    35 #endif
       
    36 
       
    37 #ifdef LIBXML_PATTERN_ENABLED
       
    38 #include "libxml2_pattern.h"
       
    39 #endif
       
    40 //----------------------------------------------------------
       
    41 
       
    42 #ifdef LIBXML_READER_ENABLED
       
    43 
       
    44 #ifdef __cplusplus
       
    45 extern "C" {
       
    46 #endif
       
    47 
       
    48 /**
       
    49  * xmlTextReaderMode:
       
    50  *
       
    51  * Internal state values for the reader.
       
    52  */
       
    53 typedef enum {
       
    54     XML_TEXTREADER_MODE_INITIAL = 0,
       
    55     XML_TEXTREADER_MODE_INTERACTIVE = 1,
       
    56     XML_TEXTREADER_MODE_ERROR = 2,
       
    57     XML_TEXTREADER_MODE_EOF =3,
       
    58     XML_TEXTREADER_MODE_CLOSED = 4,
       
    59     XML_TEXTREADER_MODE_READING = 5
       
    60 } xmlTextReaderMode;
       
    61 
       
    62 /**
       
    63  * xmlParserProperties:
       
    64  *
       
    65  * Some common options to use with xmlTextReaderSetParserProp, but it
       
    66  * is better to use xmlParserOption and the xmlReaderNewxxx and
       
    67  * xmlReaderForxxx APIs now.
       
    68  */
       
    69 typedef enum {
       
    70     XML_PARSER_LOADDTD = 1,
       
    71     XML_PARSER_DEFAULTATTRS = 2,
       
    72     XML_PARSER_VALIDATE = 3,
       
    73     XML_PARSER_SUBST_ENTITIES = 4
       
    74 } xmlParserProperties;
       
    75 
       
    76 /**
       
    77  * xmlParserSeverities:
       
    78  *
       
    79  * How severe an error callback is when the per-reader error callback API
       
    80  * is used.
       
    81  */
       
    82 typedef enum {
       
    83     XML_PARSER_SEVERITY_VALIDITY_WARNING = 1,
       
    84     XML_PARSER_SEVERITY_VALIDITY_ERROR = 2,
       
    85     XML_PARSER_SEVERITY_WARNING = 3,
       
    86     XML_PARSER_SEVERITY_ERROR = 4
       
    87 } xmlParserSeverities;
       
    88 
       
    89 /**
       
    90  * xmlReaderTypes:
       
    91  *
       
    92  * Predefined constants for the different types of nodes.
       
    93  */
       
    94 typedef enum {
       
    95     XML_READER_TYPE_NONE = 0,
       
    96     XML_READER_TYPE_ELEMENT = 1,
       
    97     XML_READER_TYPE_ATTRIBUTE = 2,
       
    98     XML_READER_TYPE_TEXT = 3,
       
    99     XML_READER_TYPE_CDATA = 4,
       
   100     XML_READER_TYPE_ENTITY_REFERENCE = 5,
       
   101     XML_READER_TYPE_ENTITY = 6,
       
   102     XML_READER_TYPE_PROCESSING_INSTRUCTION = 7,
       
   103     XML_READER_TYPE_COMMENT = 8,
       
   104     XML_READER_TYPE_DOCUMENT = 9,
       
   105     XML_READER_TYPE_DOCUMENT_TYPE = 10,
       
   106     XML_READER_TYPE_DOCUMENT_FRAGMENT = 11,
       
   107     XML_READER_TYPE_NOTATION = 12,
       
   108     XML_READER_TYPE_WHITESPACE = 13,
       
   109     XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14,
       
   110     XML_READER_TYPE_END_ELEMENT = 15,
       
   111     XML_READER_TYPE_END_ENTITY = 16,
       
   112     XML_READER_TYPE_XML_DECLARATION = 17
       
   113 } xmlReaderTypes;
       
   114 
       
   115 /*
       
   116  * Error handling extensions
       
   117  */
       
   118 typedef void *  xmlTextReaderLocatorPtr;
       
   119 typedef void   (XMLCALL *xmlTextReaderErrorFunc)        (void *arg,
       
   120                          const char *msg,
       
   121                          xmlParserSeverities severity,
       
   122                          xmlTextReaderLocatorPtr locator);
       
   123 /**
       
   124  * xmlTextReader:
       
   125  *
       
   126  * Structure for an xmlReader context.
       
   127  */
       
   128 typedef struct _xmlTextReader xmlTextReader;
       
   129 
       
   130 /**
       
   131  * xmlTextReaderPtr:
       
   132  *
       
   133  * Pointer to an xmlReader context.
       
   134  */
       
   135 typedef xmlTextReader *xmlTextReaderPtr;
       
   136 // XMLENGINE: This moved to header from xmlreader.c file
       
   137 typedef enum {
       
   138     XML_TEXTREADER_NONE = -1,
       
   139     XML_TEXTREADER_START= 0,
       
   140     XML_TEXTREADER_ELEMENT= 1,
       
   141     XML_TEXTREADER_END= 2,
       
   142     XML_TEXTREADER_EMPTY= 3,
       
   143     XML_TEXTREADER_BACKTRACK= 4,
       
   144     XML_TEXTREADER_DONE= 5,
       
   145     XML_TEXTREADER_ERROR= 6
       
   146 } xmlTextReaderState;
       
   147 
       
   148 typedef enum {
       
   149     XML_TEXTREADER_NOT_VALIDATE = 0,
       
   150     XML_TEXTREADER_VALIDATE_DTD = 1,
       
   151     XML_TEXTREADER_VALIDATE_RNG = 2,
       
   152     XML_TEXTREADER_VALIDATE_XSD = 4
       
   153 } xmlTextReaderValidate;
       
   154 
       
   155 struct _xmlTextReader {
       
   156     int                     mode;           /* the parsing mode */
       
   157     xmlDocPtr               doc;            /* when walking an existing doc */
       
   158     xmlTextReaderValidate   validate;       /* is there any validation */
       
   159     int                     allocs;         /* what structure were deallocated */
       
   160     xmlTextReaderState      state;
       
   161     xmlParserCtxtPtr        ctxt;           /* the parser context */
       
   162     xmlSAXHandlerPtr        sax;            /* the parser SAX callbacks */
       
   163     xmlParserInputBufferPtr input;          /* the input */
       
   164     startElementSAXFunc     startElement;   /* initial SAX callbacks */
       
   165     endElementSAXFunc       endElement;     /* idem */
       
   166     startElementNsSAX2Func  startElementNs; /* idem */
       
   167     endElementNsSAX2Func    endElementNs;   /* idem */
       
   168     charactersSAXFunc       characters;
       
   169     cdataBlockSAXFunc       cdataBlock;
       
   170     unsigned int            base;    /* base of the segment in the input */
       
   171     unsigned int            cur;     /* current position in the input */
       
   172     xmlNodePtr              node;    /* current node */
       
   173     xmlNodePtr              curnode; /* current attribute node */
       
   174     int                     depth;   /* depth of the current node */
       
   175     xmlNodePtr              faketext;/* fake xmlNs chld */
       
   176     int                     preserve;/* preserve the resulting document */
       
   177     xmlBufferPtr            buffer;  /* used to return const xmlChar * */
       
   178     xmlDictPtr              dict;    /* the context dictionnary */
       
   179 
       
   180     /* entity stack when traversing entities content */
       
   181     xmlNodePtr              ent;          /* Current Entity Ref Node */
       
   182     int                     entNr;        /* Depth of the entities stack */
       
   183     int                     entMax;       /* Max depth of the entities stack */
       
   184     xmlNodePtr*             entTab;       /* array of entities */
       
   185 
       
   186     /* error handling */
       
   187     xmlTextReaderErrorFunc  errorFunc;    /* callback function */
       
   188     void*                   errorFuncArg; /* callback function user argument */
       
   189 
       
   190 #ifdef LIBXML_SCHEMAS_ENABLED
       
   191     /* Handling of RelaxNG validation */
       
   192     xmlRelaxNGPtr           rngSchemas;    /* The Relax NG schemas */
       
   193     xmlRelaxNGValidCtxtPtr  rngValidCtxt;  /* The Relax NG validation context */
       
   194     int                     rngValidErrors;/* The number of errors detected */
       
   195     xmlNodePtr              rngFullNode;   /* the node if RNG not progressive */
       
   196     /* Handling of Schemas validation */
       
   197     xmlSchemaPtr          xsdSchemas;   /* The Schemas schemas */
       
   198     xmlSchemaValidCtxtPtr xsdValidCtxt;/* The Schemas validation context */
       
   199     int                  xsdValidErrors;/* The number of errors detected */
       
   200     xmlSchemaSAXPlugPtr   xsdPlug;  /* the schemas plug in SAX pipeline */
       
   201 #endif
       
   202 #ifdef LIBXML_XINCLUDE_ENABLED
       
   203     /* Handling of XInclude processing */
       
   204     int                     xinclude;      /* is xinclude asked for */
       
   205     const xmlChar*          xinclude_name; /* the xinclude name from dict */
       
   206     xmlXIncludeCtxtPtr      xincctxt;      /* the xinclude context */
       
   207     int                     in_xinclude;   /* counts for xinclude */
       
   208 #endif
       
   209 #ifdef LIBXML_PATTERN_ENABLED
       
   210     int                     patternNr;     /* number of preserve patterns */
       
   211     int                     patternMax;    /* max preserve patterns */
       
   212     xmlPatternPtr*          patternTab;    /* array of preserve patterns */
       
   213 #endif
       
   214     int                     preserves;     /* level of preserves */
       
   215     int                     parserFlags;   /* the set of options set */
       
   216     /* Structured error handling */
       
   217     xmlStructuredErrorFunc  sErrorFunc;    /* callback function */
       
   218 };
       
   219 
       
   220 /*
       
   221  * Constructors & Destructor
       
   222  */
       
   223 XMLPUBFUN xmlTextReaderPtr XMLCALL
       
   224                         xmlNewTextReader        (xmlParserInputBufferPtr input,
       
   225                                                  const char *URI);
       
   226 XMLPUBFUN xmlTextReaderPtr XMLCALL
       
   227                         xmlNewTextReaderFilename(const char *URI);
       
   228 XMLPUBFUN void XMLCALL
       
   229                         xmlFreeTextReader       (xmlTextReaderPtr reader);
       
   230 
       
   231 /*
       
   232  * Iterators
       
   233  */
       
   234 XMLPUBFUN int XMLCALL
       
   235                         xmlTextReaderRead       (xmlTextReaderPtr reader);
       
   236 XMLPUBFUN xmlChar * XMLCALL
       
   237                         xmlTextReaderReadInnerXml       (xmlTextReaderPtr reader);
       
   238 XMLPUBFUN xmlChar * XMLCALL
       
   239                         xmlTextReaderReadOuterXml       (xmlTextReaderPtr reader);
       
   240 XMLPUBFUN xmlChar * XMLCALL
       
   241                         xmlTextReaderReadString         (xmlTextReaderPtr reader);
       
   242 XMLPUBFUN int XMLCALL
       
   243                         xmlTextReaderReadAttributeValue (xmlTextReaderPtr reader);
       
   244 
       
   245 /*
       
   246  * Attributes of the node
       
   247  */
       
   248 XMLPUBFUN int XMLCALL
       
   249                         xmlTextReaderAttributeCount(xmlTextReaderPtr reader);
       
   250 XMLPUBFUN int XMLCALL
       
   251                         xmlTextReaderDepth      (xmlTextReaderPtr reader);
       
   252 XMLPUBFUN int XMLCALL
       
   253                         xmlTextReaderHasAttributes(xmlTextReaderPtr reader);
       
   254 XMLPUBFUN int XMLCALL
       
   255                         xmlTextReaderHasValue(xmlTextReaderPtr reader);
       
   256 XMLPUBFUN int XMLCALL
       
   257                         xmlTextReaderIsDefault  (xmlTextReaderPtr reader);
       
   258 XMLPUBFUN int XMLCALL
       
   259                         xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader);
       
   260 XMLPUBFUN int XMLCALL
       
   261                         xmlTextReaderNodeType   (xmlTextReaderPtr reader);
       
   262 XMLPUBFUN int XMLCALL
       
   263                         xmlTextReaderQuoteChar  (xmlTextReaderPtr reader);
       
   264 XMLPUBFUN int XMLCALL
       
   265                         xmlTextReaderReadState  (xmlTextReaderPtr reader);
       
   266 XMLPUBFUN int XMLCALL
       
   267             xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader);
       
   268 
       
   269 XMLPUBFUN const xmlChar * XMLCALL
       
   270                     xmlTextReaderConstBaseUri   (xmlTextReaderPtr reader);
       
   271 XMLPUBFUN const xmlChar * XMLCALL
       
   272                     xmlTextReaderConstLocalName (xmlTextReaderPtr reader);
       
   273 XMLPUBFUN const xmlChar * XMLCALL
       
   274                     xmlTextReaderConstName      (xmlTextReaderPtr reader);
       
   275 XMLPUBFUN const xmlChar * XMLCALL
       
   276                     xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader);
       
   277 XMLPUBFUN const xmlChar * XMLCALL
       
   278                     xmlTextReaderConstPrefix    (xmlTextReaderPtr reader);
       
   279 XMLPUBFUN const xmlChar * XMLCALL
       
   280                     xmlTextReaderConstXmlLang   (xmlTextReaderPtr reader);
       
   281 XMLPUBFUN const xmlChar * XMLCALL
       
   282                     xmlTextReaderConstString    (xmlTextReaderPtr reader,
       
   283                                                  const xmlChar *str);
       
   284 XMLPUBFUN const xmlChar * XMLCALL
       
   285                     xmlTextReaderConstValue     (xmlTextReaderPtr reader);
       
   286 
       
   287 /*
       
   288  * use the Const version of the routine for
       
   289  * better performance and simpler code
       
   290  */
       
   291 XMLPUBFUN xmlChar * XMLCALL
       
   292                         xmlTextReaderBaseUri    (xmlTextReaderPtr reader);
       
   293 XMLPUBFUN xmlChar * XMLCALL
       
   294                         xmlTextReaderLocalName  (xmlTextReaderPtr reader);
       
   295 XMLPUBFUN xmlChar * XMLCALL
       
   296                         xmlTextReaderName       (xmlTextReaderPtr reader);
       
   297 XMLPUBFUN xmlChar * XMLCALL
       
   298                         xmlTextReaderNamespaceUri(xmlTextReaderPtr reader);
       
   299 XMLPUBFUN xmlChar * XMLCALL
       
   300                         xmlTextReaderPrefix     (xmlTextReaderPtr reader);
       
   301 XMLPUBFUN xmlChar * XMLCALL
       
   302                         xmlTextReaderXmlLang    (xmlTextReaderPtr reader);
       
   303 XMLPUBFUN xmlChar * XMLCALL
       
   304                         xmlTextReaderValue      (xmlTextReaderPtr reader);
       
   305 
       
   306 /*
       
   307  * Methods of the XmlTextReader
       
   308  */
       
   309 XMLPUBFUN int XMLCALL
       
   310                     xmlTextReaderClose          (xmlTextReaderPtr reader);
       
   311 XMLPUBFUN xmlChar * XMLCALL
       
   312                     xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader,
       
   313                                                  int no);
       
   314 XMLPUBFUN xmlChar * XMLCALL
       
   315                     xmlTextReaderGetAttribute   (xmlTextReaderPtr reader,
       
   316                                                  const xmlChar *name);
       
   317 XMLPUBFUN xmlChar * XMLCALL
       
   318                     xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader,
       
   319                                                  const xmlChar *localName,
       
   320                                                  const xmlChar *namespaceURI);
       
   321 XMLPUBFUN xmlParserInputBufferPtr XMLCALL
       
   322                     xmlTextReaderGetRemainder   (xmlTextReaderPtr reader);
       
   323 XMLPUBFUN xmlChar * XMLCALL
       
   324                     xmlTextReaderLookupNamespace(xmlTextReaderPtr reader,
       
   325                                                  const xmlChar *prefix);
       
   326 XMLPUBFUN int XMLCALL
       
   327                     xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader,
       
   328                                                  int no);
       
   329 XMLPUBFUN int XMLCALL
       
   330                     xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader,
       
   331                                                  const xmlChar *name);
       
   332 XMLPUBFUN int XMLCALL
       
   333                     xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader,
       
   334                                                  const xmlChar *localName,
       
   335                                                  const xmlChar *namespaceURI);
       
   336 XMLPUBFUN int XMLCALL
       
   337                     xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader);
       
   338 XMLPUBFUN int XMLCALL
       
   339                     xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader);
       
   340 XMLPUBFUN int XMLCALL
       
   341                     xmlTextReaderMoveToElement  (xmlTextReaderPtr reader);
       
   342 XMLPUBFUN int XMLCALL
       
   343                     xmlTextReaderNormalization  (xmlTextReaderPtr reader);
       
   344 XMLPUBFUN const xmlChar * XMLCALL
       
   345             xmlTextReaderConstEncoding  (xmlTextReaderPtr reader);
       
   346 
       
   347 /*
       
   348  * Extensions
       
   349  */
       
   350 XMLPUBFUN int XMLCALL
       
   351                     xmlTextReaderSetParserProp  (xmlTextReaderPtr reader,
       
   352                                                  int prop,
       
   353                                                  int value);
       
   354 XMLPUBFUN int XMLCALL
       
   355                     xmlTextReaderGetParserProp  (xmlTextReaderPtr reader,
       
   356                                                  int prop);
       
   357 XMLPUBFUN xmlNodePtr XMLCALL
       
   358                     xmlTextReaderCurrentNode    (xmlTextReaderPtr reader);
       
   359 XMLPUBFUN int XMLCALL
       
   360             xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader);
       
   361 
       
   362 XMLPUBFUN int XMLCALL
       
   363             xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
       
   364 
       
   365 XMLPUBFUN xmlNodePtr XMLCALL
       
   366             xmlTextReaderPreserve   (xmlTextReaderPtr reader);
       
   367 #ifdef LIBXML_PATTERN_ENABLED
       
   368 XMLPUBFUN int XMLCALL
       
   369                     xmlTextReaderPreservePattern(xmlTextReaderPtr reader,
       
   370                                                  const xmlChar *pattern,
       
   371                                                  const xmlChar **namespaces);
       
   372 #endif /* LIBXML_PATTERN_ENABLED */
       
   373 XMLPUBFUN xmlDocPtr XMLCALL
       
   374                     xmlTextReaderCurrentDoc     (xmlTextReaderPtr reader);
       
   375 XMLPUBFUN xmlNodePtr XMLCALL
       
   376                     xmlTextReaderExpand         (xmlTextReaderPtr reader);
       
   377 XMLPUBFUN int XMLCALL
       
   378                     xmlTextReaderNext           (xmlTextReaderPtr reader);
       
   379 XMLPUBFUN int XMLCALL
       
   380                     xmlTextReaderNextSibling    (xmlTextReaderPtr reader);
       
   381 XMLPUBFUN int XMLCALL
       
   382                     xmlTextReaderIsValid        (xmlTextReaderPtr reader);
       
   383 #ifdef LIBXML_SCHEMAS_ENABLED
       
   384 XMLPUBFUN int XMLCALL
       
   385                     xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
       
   386                                                  const char *rng);
       
   387 XMLPUBFUN int XMLCALL
       
   388                     xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
       
   389                                                  xmlRelaxNGPtr schema);
       
   390 XMLPUBFUN int XMLCALL
       
   391             xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
       
   392                              const char *xsd);
       
   393 XMLPUBFUN int XMLCALL
       
   394             xmlTextReaderSetSchema  (xmlTextReaderPtr reader,
       
   395                              xmlSchemaPtr schema);
       
   396 #endif
       
   397 XMLPUBFUN const xmlChar * XMLCALL
       
   398             xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
       
   399 XMLPUBFUN int XMLCALL
       
   400             xmlTextReaderStandalone     (xmlTextReaderPtr reader);
       
   401 
       
   402 
       
   403 /*
       
   404  * Index lookup
       
   405  */
       
   406 XMLPUBFUN long XMLCALL
       
   407         xmlTextReaderByteConsumed   (xmlTextReaderPtr reader);
       
   408 
       
   409 /*
       
   410  * New more complete APIs for simpler creation and reuse of readers
       
   411  */
       
   412 XMLPUBFUN xmlTextReaderPtr XMLCALL
       
   413                 xmlReaderWalker         (xmlDocPtr doc);
       
   414 XMLPUBFUN xmlTextReaderPtr XMLCALL
       
   415                 xmlReaderForDoc         (const xmlChar * cur,
       
   416                                          const char *URL,
       
   417                                          const char *encoding,
       
   418                                          int options);
       
   419 XMLPUBFUN xmlTextReaderPtr XMLCALL
       
   420                 xmlReaderForFile        (const char *filename,
       
   421                                          const char *encoding,
       
   422                                          int options);
       
   423 XMLPUBFUN xmlTextReaderPtr XMLCALL
       
   424                 xmlReaderForMemory      (const char *buffer,
       
   425                                          int size,
       
   426                                          const char *URL,
       
   427                                          const char *encoding,
       
   428                                          int options);
       
   429 XMLPUBFUN xmlTextReaderPtr XMLCALL
       
   430                 xmlReaderForFd          (int fd,
       
   431                                          const char *URL,
       
   432                                          const char *encoding,
       
   433                                          int options);
       
   434 XMLPUBFUN xmlTextReaderPtr XMLCALL
       
   435                 xmlReaderForIO          (xmlInputReadCallback ioread,
       
   436                                          xmlInputCloseCallback ioclose,
       
   437                                          void *ioctx,
       
   438                                          const char *URL,
       
   439                                          const char *encoding,
       
   440                                          int options);
       
   441 
       
   442 XMLPUBFUN int XMLCALL
       
   443                 xmlReaderNewWalker      (xmlTextReaderPtr reader,
       
   444                                          xmlDocPtr doc);
       
   445 XMLPUBFUN int XMLCALL
       
   446                 xmlReaderNewDoc         (xmlTextReaderPtr reader,
       
   447                                          const xmlChar * cur,
       
   448                                          const char *URL,
       
   449                                          const char *encoding,
       
   450                                          int options);
       
   451 XMLPUBFUN int XMLCALL
       
   452                 xmlReaderNewFile        (xmlTextReaderPtr reader,
       
   453                                          const char *filename,
       
   454                                          const char *encoding,
       
   455                                          int options);
       
   456 XMLPUBFUN int XMLCALL
       
   457                 xmlReaderNewMemory      (xmlTextReaderPtr reader,
       
   458                                          const char *buffer,
       
   459                                          int size,
       
   460                                          const char *URL,
       
   461                                          const char *encoding,
       
   462                                          int options);
       
   463 XMLPUBFUN int XMLCALL
       
   464                 xmlReaderNewFd          (xmlTextReaderPtr reader,
       
   465                                          int fd,
       
   466                                          const char *URL,
       
   467                                          const char *encoding,
       
   468                                          int options);
       
   469 XMLPUBFUN int XMLCALL
       
   470                 xmlReaderNewIO          (xmlTextReaderPtr reader,
       
   471                                          xmlInputReadCallback ioread,
       
   472                                          xmlInputCloseCallback ioclose,
       
   473                                          void *ioctx,
       
   474                                          const char *URL,
       
   475                                          const char *encoding,
       
   476                                          int options);
       
   477 
       
   478 // typedefs moved in the beginning of the header
       
   479 
       
   480 #ifdef LIBXML_ENABLE_NODE_LINEINFO
       
   481 XMLPUBFUN int XMLCALL
       
   482             xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
       
   483 #endif /* LIBXML_ENABLE_NODE_LINEINFO */
       
   484 
       
   485 XMLPUBFUN xmlChar * XMLCALL
       
   486             xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
       
   487 XMLPUBFUN void XMLCALL
       
   488             xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
       
   489                          xmlTextReaderErrorFunc f,
       
   490                          void *arg);
       
   491 XMLPUBFUN void XMLCALL
       
   492             xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
       
   493                                xmlStructuredErrorFunc f,
       
   494                                void *arg);
       
   495 XMLPUBFUN void XMLCALL
       
   496             xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
       
   497                          xmlTextReaderErrorFunc *f,
       
   498                          void **arg);
       
   499 
       
   500 #ifdef __cplusplus
       
   501 }
       
   502 #endif
       
   503 
       
   504 #endif /* LIBXML_READER_ENABLED */
       
   505 
       
   506 #endif /* XML_XMLREADER_H */
       
   507