00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __XML_PARSER_H__
00010 #define __XML_PARSER_H__
00011
00012 #include <stdarg.h>
00013
00014 #include <libxml/xmlversion.h>
00015 #include <libxml/tree.h>
00016 #include <libxml/dict.h>
00017 #include <libxml/hash.h>
00018 #include <libxml/valid.h>
00019 #include <libxml/entities.h>
00020 #include <libxml/xmlerror.h>
00021
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025
00031 #define XML_DEFAULT_VERSION "1.0"
00032
00050 typedef void (* xmlParserInputDeallocate)(xmlChar *str);
00051
00052 struct _xmlParserInput {
00053
00054 xmlParserInputBufferPtr buf;
00055
00056 const char *filename;
00057 const char *directory;
00058 const xmlChar *base;
00059 const xmlChar *cur;
00060 const xmlChar *end;
00061 int length;
00062 int line;
00063 int col;
00064
00065
00066
00067
00068
00069 unsigned long consumed;
00070 xmlParserInputDeallocate free;
00071 const xmlChar *encoding;
00072 const xmlChar *version;
00073 int standalone;
00074 int id;
00075 };
00076
00084 typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
00085 typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
00086
00087 struct _xmlParserNodeInfo {
00088 const struct _xmlNode* node;
00089
00090 unsigned long begin_pos;
00091 unsigned long begin_line;
00092 unsigned long end_pos;
00093 unsigned long end_line;
00094 };
00095
00096 typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;
00097 typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;
00098 struct _xmlParserNodeInfoSeq {
00099 unsigned long maximum;
00100 unsigned long length;
00101 xmlParserNodeInfo* buffer;
00102 };
00103
00110 typedef enum {
00111 XML_PARSER_EOF = -1,
00112 XML_PARSER_START = 0,
00113 XML_PARSER_MISC,
00114 XML_PARSER_PI,
00115 XML_PARSER_DTD,
00116 XML_PARSER_PROLOG,
00117 XML_PARSER_COMMENT,
00118 XML_PARSER_START_TAG,
00119 XML_PARSER_CONTENT,
00120 XML_PARSER_CDATA_SECTION,
00121 XML_PARSER_END_TAG,
00122 XML_PARSER_ENTITY_DECL,
00123 XML_PARSER_ENTITY_VALUE,
00124 XML_PARSER_ATTRIBUTE_VALUE,
00125 XML_PARSER_SYSTEM_LITERAL,
00126 XML_PARSER_EPILOG,
00127 XML_PARSER_IGNORE,
00128 XML_PARSER_PUBLIC_LITERAL
00129 } xmlParserInputState;
00130
00137 #define XML_DETECT_IDS 2
00138
00146 #define XML_COMPLETE_ATTRS 4
00147
00154 #define XML_SKIP_IDS 8
00155
00168 struct _xmlParserCtxt {
00169 struct _xmlSAXHandler *sax;
00170 void *userData;
00171 xmlDocPtr myDoc;
00172 int wellFormed;
00173 int replaceEntities;
00174 const xmlChar *version;
00175 const xmlChar *encoding;
00176 int standalone;
00177 int html;
00178
00179
00180 xmlParserInputPtr input;
00181 int inputNr;
00182 int inputMax;
00183 xmlParserInputPtr *inputTab;
00184
00185
00186 xmlNodePtr node;
00187 int nodeNr;
00188 int nodeMax;
00189 xmlNodePtr *nodeTab;
00190
00191 int record_info;
00192 xmlParserNodeInfoSeq node_seq;
00193
00194 int errNo;
00195
00196 int hasExternalSubset;
00197 int hasPErefs;
00198 int external;
00199
00200 int valid;
00201 int validate;
00202 xmlValidCtxt vctxt;
00203
00204 xmlParserInputState instate;
00205 int token;
00206
00207 char *directory;
00208
00209
00210 const xmlChar *name;
00211 int nameNr;
00212 int nameMax;
00213 const xmlChar * *nameTab;
00214
00215 long nbChars;
00216 long checkIndex;
00217 int keepBlanks;
00218 int disableSAX;
00219 int inSubset;
00220 const xmlChar * intSubName;
00221 xmlChar * extSubURI;
00222 xmlChar * extSubSystem;
00223
00224
00225 int * space;
00226 int spaceNr;
00227 int spaceMax;
00228 int * spaceTab;
00229
00230 int depth;
00231 xmlParserInputPtr entity;
00232 int charset;
00233
00234 int nodelen;
00235 int nodemem;
00236 int pedantic;
00237 void *_private;
00238
00239 int loadsubset;
00240 int linenumbers;
00241 void *catalogs;
00242 int recovery;
00243 int progressive;
00244 xmlDictPtr dict;
00245 const xmlChar * *atts;
00246 int maxatts;
00247 int docdict;
00248
00249
00250
00251
00252 const xmlChar *str_xml;
00253 const xmlChar *str_xmlns;
00254 const xmlChar *str_xml_ns;
00255
00256
00257
00258
00259 int sax2;
00260 int nsNr;
00261 int nsMax;
00262 const xmlChar * *nsTab;
00263 int *attallocs;
00264 void * *pushTab;
00265 xmlHashTablePtr attsDefault;
00266 xmlHashTablePtr attsSpecial;
00267 int nsWellFormed;
00268 int options;
00269
00270
00271
00272
00273 int dictNames;
00274 int freeElemsNr;
00275 xmlNodePtr freeElems;
00276 int freeAttrsNr;
00277 xmlAttrPtr freeAttrs;
00278
00279
00280
00281
00282 xmlError lastError;
00283 };
00284
00290 struct _xmlSAXLocator {
00291 const xmlChar *(*getPublicId)(void *ctx);
00292 const xmlChar *(*getSystemId)(void *ctx);
00293 int (*getLineNumber)(void *ctx);
00294 int (*getColumnNumber)(void *ctx);
00295 };
00296
00319 typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
00320 const xmlChar *publicId,
00321 const xmlChar *systemId);
00331 typedef void (*internalSubsetSAXFunc) (void *ctx,
00332 const xmlChar *name,
00333 const xmlChar *ExternalID,
00334 const xmlChar *SystemID);
00344 typedef void (*externalSubsetSAXFunc) (void *ctx,
00345 const xmlChar *name,
00346 const xmlChar *ExternalID,
00347 const xmlChar *SystemID);
00357 typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
00358 const xmlChar *name);
00368 typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
00369 const xmlChar *name);
00381 typedef void (*entityDeclSAXFunc) (void *ctx,
00382 const xmlChar *name,
00383 int type,
00384 const xmlChar *publicId,
00385 const xmlChar *systemId,
00386 xmlChar *content);
00396 typedef void (*notationDeclSAXFunc)(void *ctx,
00397 const xmlChar *name,
00398 const xmlChar *publicId,
00399 const xmlChar *systemId);
00412 typedef void (*attributeDeclSAXFunc)(void *ctx,
00413 const xmlChar *elem,
00414 const xmlChar *fullname,
00415 int type,
00416 int def,
00417 const xmlChar *defaultValue,
00418 xmlEnumerationPtr tree);
00428 typedef void (*elementDeclSAXFunc)(void *ctx,
00429 const xmlChar *name,
00430 int type,
00431 xmlElementContentPtr content);
00442 typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
00443 const xmlChar *name,
00444 const xmlChar *publicId,
00445 const xmlChar *systemId,
00446 const xmlChar *notationName);
00455 typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
00456 xmlSAXLocatorPtr loc);
00463 typedef void (*startDocumentSAXFunc) (void *ctx);
00470 typedef void (*endDocumentSAXFunc) (void *ctx);
00479 typedef void (*startElementSAXFunc) (void *ctx,
00480 const xmlChar *name,
00481 const xmlChar **atts);
00489 typedef void (*endElementSAXFunc) (void *ctx,
00490 const xmlChar *name);
00502 typedef void (*attributeSAXFunc) (void *ctx,
00503 const xmlChar *name,
00504 const xmlChar *value);
00512 typedef void (*referenceSAXFunc) (void *ctx,
00513 const xmlChar *name);
00522 typedef void (*charactersSAXFunc) (void *ctx,
00523 const xmlChar *ch,
00524 int len);
00534 typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
00535 const xmlChar *ch,
00536 int len);
00545 typedef void (*processingInstructionSAXFunc) (void *ctx,
00546 const xmlChar *target,
00547 const xmlChar *data);
00555 typedef void (*commentSAXFunc) (void *ctx,
00556 const xmlChar *value);
00565 typedef void (*cdataBlockSAXFunc) (
00566 void *ctx,
00567 const xmlChar *value,
00568 int len);
00577 typedef void (*warningSAXFunc) (void *ctx,
00578 const char *msg, ...);
00587 typedef void (*errorSAXFunc) (void *ctx,
00588 const char *msg, ...);
00599 typedef void (*fatalErrorSAXFunc) (void *ctx,
00600 const char *msg, ...);
00609 typedef int (*isStandaloneSAXFunc) (void *ctx);
00618 typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
00619
00628 typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
00629
00630
00631
00632
00633
00634
00640 #define XML_SAX2_MAGIC 0xDEEDBEAF
00641
00661 typedef void (*startElementNsSAX2Func) (void *ctx,
00662 const xmlChar *localname,
00663 const xmlChar *prefix,
00664 const xmlChar *URI,
00665 int nb_namespaces,
00666 const xmlChar **namespaces,
00667 int nb_attributes,
00668 int nb_defaulted,
00669 const xmlChar **attributes);
00670
00682 typedef void (*endElementNsSAX2Func) (void *ctx,
00683 const xmlChar *localname,
00684 const xmlChar *prefix,
00685 const xmlChar *URI);
00686
00687
00688 struct _xmlSAXHandler {
00689 internalSubsetSAXFunc internalSubset;
00690 isStandaloneSAXFunc isStandalone;
00691 hasInternalSubsetSAXFunc hasInternalSubset;
00692 hasExternalSubsetSAXFunc hasExternalSubset;
00693 resolveEntitySAXFunc resolveEntity;
00694 getEntitySAXFunc getEntity;
00695 entityDeclSAXFunc entityDecl;
00696 notationDeclSAXFunc notationDecl;
00697 attributeDeclSAXFunc attributeDecl;
00698 elementDeclSAXFunc elementDecl;
00699 unparsedEntityDeclSAXFunc unparsedEntityDecl;
00700 setDocumentLocatorSAXFunc setDocumentLocator;
00701 startDocumentSAXFunc startDocument;
00702 endDocumentSAXFunc endDocument;
00703 startElementSAXFunc startElement;
00704 endElementSAXFunc endElement;
00705 referenceSAXFunc reference;
00706 charactersSAXFunc characters;
00707 ignorableWhitespaceSAXFunc ignorableWhitespace;
00708 processingInstructionSAXFunc processingInstruction;
00709 commentSAXFunc comment;
00710 warningSAXFunc warning;
00711 errorSAXFunc error;
00712 fatalErrorSAXFunc fatalError;
00713 getParameterEntitySAXFunc getParameterEntity;
00714 cdataBlockSAXFunc cdataBlock;
00715 externalSubsetSAXFunc externalSubset;
00716 unsigned int initialized;
00717
00718 void *_private;
00719 startElementNsSAX2Func startElementNs;
00720 endElementNsSAX2Func endElementNs;
00721 xmlStructuredErrorFunc serror;
00722 };
00723
00724
00725
00726
00727 typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1;
00728 typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr;
00729 struct _xmlSAXHandlerV1 {
00730 internalSubsetSAXFunc internalSubset;
00731 isStandaloneSAXFunc isStandalone;
00732 hasInternalSubsetSAXFunc hasInternalSubset;
00733 hasExternalSubsetSAXFunc hasExternalSubset;
00734 resolveEntitySAXFunc resolveEntity;
00735 getEntitySAXFunc getEntity;
00736 entityDeclSAXFunc entityDecl;
00737 notationDeclSAXFunc notationDecl;
00738 attributeDeclSAXFunc attributeDecl;
00739 elementDeclSAXFunc elementDecl;
00740 unparsedEntityDeclSAXFunc unparsedEntityDecl;
00741 setDocumentLocatorSAXFunc setDocumentLocator;
00742 startDocumentSAXFunc startDocument;
00743 endDocumentSAXFunc endDocument;
00744 startElementSAXFunc startElement;
00745 endElementSAXFunc endElement;
00746 referenceSAXFunc reference;
00747 charactersSAXFunc characters;
00748 ignorableWhitespaceSAXFunc ignorableWhitespace;
00749 processingInstructionSAXFunc processingInstruction;
00750 commentSAXFunc comment;
00751 warningSAXFunc warning;
00752 errorSAXFunc error;
00753 fatalErrorSAXFunc fatalError;
00754 getParameterEntitySAXFunc getParameterEntity;
00755 cdataBlockSAXFunc cdataBlock;
00756 externalSubsetSAXFunc externalSubset;
00757 unsigned int initialized;
00758 };
00759
00760
00771 typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
00772 const char *ID,
00773 xmlParserCtxtPtr context);
00774
00775 #ifdef __cplusplus
00776 }
00777 #endif
00778
00779 #include <libxml/encoding.h>
00780 #include <libxml/xmlIO.h>
00781 #include <libxml/globals.h>
00782
00783 #ifdef __cplusplus
00784 extern "C" {
00785 #endif
00786
00787
00788
00789
00790
00791 XMLPUBFUN void XMLCALL
00792 xmlInitParser (void);
00793 XMLPUBFUN void XMLCALL
00794 xmlCleanupParser (void);
00795
00796
00797
00798
00799 XMLPUBFUN int XMLCALL
00800 xmlParserInputRead (xmlParserInputPtr in,
00801 int len);
00802 XMLPUBFUN int XMLCALL
00803 xmlParserInputGrow (xmlParserInputPtr in,
00804 int len);
00805
00806
00807
00808
00809 XMLPUBFUN xmlChar * XMLCALL
00810 xmlStrdup (const xmlChar *cur);
00811 XMLPUBFUN xmlChar * XMLCALL
00812 xmlStrndup (const xmlChar *cur,
00813 int len);
00814 XMLPUBFUN xmlChar * XMLCALL
00815 xmlCharStrndup (const char *cur,
00816 int len);
00817 XMLPUBFUN xmlChar * XMLCALL
00818 xmlCharStrdup (const char *cur);
00819 XMLPUBFUN xmlChar * XMLCALL
00820 xmlStrsub (const xmlChar *str,
00821 int start,
00822 int len);
00823 XMLPUBFUN const xmlChar * XMLCALL
00824 xmlStrchr (const xmlChar *str,
00825 xmlChar val);
00826 XMLPUBFUN const xmlChar * XMLCALL
00827 xmlStrstr (const xmlChar *str,
00828 const xmlChar *val);
00829 XMLPUBFUN const xmlChar * XMLCALL
00830 xmlStrcasestr (const xmlChar *str,
00831 xmlChar *val);
00832 XMLPUBFUN int XMLCALL
00833 xmlStrcmp (const xmlChar *str1,
00834 const xmlChar *str2);
00835 XMLPUBFUN int XMLCALL
00836 xmlStrncmp (const xmlChar *str1,
00837 const xmlChar *str2,
00838 int len);
00839 XMLPUBFUN int XMLCALL
00840 xmlStrcasecmp (const xmlChar *str1,
00841 const xmlChar *str2);
00842 XMLPUBFUN int XMLCALL
00843 xmlStrncasecmp (const xmlChar *str1,
00844 const xmlChar *str2,
00845 int len);
00846 XMLPUBFUN int XMLCALL
00847 xmlStrEqual (const xmlChar *str1,
00848 const xmlChar *str2);
00849 XMLPUBFUN int XMLCALL
00850 xmlStrQEqual (const xmlChar *pref,
00851 const xmlChar *name,
00852 const xmlChar *str);
00853 XMLPUBFUN int XMLCALL
00854 xmlStrlen (const xmlChar *str);
00855 XMLPUBFUN xmlChar * XMLCALL
00856 xmlStrcat (xmlChar *cur,
00857 const xmlChar *add);
00858 XMLPUBFUN xmlChar * XMLCALL
00859 xmlStrncat (xmlChar *cur,
00860 const xmlChar *add,
00861 int len);
00862
00863 XMLPUBFUN int XMLCALL
00864 xmlStrPrintf (xmlChar *buf,
00865 int len,
00866 const xmlChar *msg,
00867 ...);
00868
00869 XMLPUBFUN int XMLCALL
00870 xmlStrVPrintf (xmlChar *buf,
00871 int len,
00872 const xmlChar *msg,
00873 va_list ap);
00874
00875
00876
00877
00878 XMLPUBFUN xmlDocPtr XMLCALL
00879 xmlParseDoc (xmlChar *cur);
00880 XMLPUBFUN xmlDocPtr XMLCALL
00881 xmlParseMemory (const char *buffer,
00882 int size);
00883 XMLPUBFUN xmlDocPtr XMLCALL
00884 xmlParseFile (const char *filename);
00885 XMLPUBFUN int XMLCALL
00886 xmlSubstituteEntitiesDefault(int val);
00887 XMLPUBFUN int XMLCALL
00888 xmlKeepBlanksDefault (int val);
00889 XMLPUBFUN void XMLCALL
00890 xmlStopParser (xmlParserCtxtPtr ctxt);
00891 XMLPUBFUN int XMLCALL
00892 xmlPedanticParserDefault(int val);
00893 XMLPUBFUN int XMLCALL
00894 xmlLineNumbersDefault (int val);
00895
00896
00897
00898
00899 XMLPUBFUN xmlDocPtr XMLCALL
00900 xmlRecoverDoc (xmlChar *cur);
00901 XMLPUBFUN xmlDocPtr XMLCALL
00902 xmlRecoverMemory (const char *buffer,
00903 int size);
00904 XMLPUBFUN xmlDocPtr XMLCALL
00905 xmlRecoverFile (const char *filename);
00906
00907
00908
00909
00910 XMLPUBFUN int XMLCALL
00911 xmlParseDocument (xmlParserCtxtPtr ctxt);
00912 XMLPUBFUN int XMLCALL
00913 xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
00914 XMLPUBFUN xmlDocPtr XMLCALL
00915 xmlSAXParseDoc (xmlSAXHandlerPtr sax,
00916 xmlChar *cur,
00917 int recovery);
00918 XMLPUBFUN int XMLCALL
00919 xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
00920 void *user_data,
00921 const char *filename);
00922 XMLPUBFUN int XMLCALL
00923 xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
00924 void *user_data,
00925 const char *buffer,
00926 int size);
00927 XMLPUBFUN xmlDocPtr XMLCALL
00928 xmlSAXParseMemory (xmlSAXHandlerPtr sax,
00929 const char *buffer,
00930 int size,
00931 int recovery);
00932 XMLPUBFUN xmlDocPtr XMLCALL
00933 xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
00934 const char *buffer,
00935 int size,
00936 int recovery,
00937 void *data);
00938 XMLPUBFUN xmlDocPtr XMLCALL
00939 xmlSAXParseFile (xmlSAXHandlerPtr sax,
00940 const char *filename,
00941 int recovery);
00942 XMLPUBFUN xmlDocPtr XMLCALL
00943 xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
00944 const char *filename,
00945 int recovery,
00946 void *data);
00947 XMLPUBFUN xmlDocPtr XMLCALL
00948 xmlSAXParseEntity (xmlSAXHandlerPtr sax,
00949 const char *filename);
00950 XMLPUBFUN xmlDocPtr XMLCALL
00951 xmlParseEntity (const char *filename);
00952 XMLPUBFUN xmlDtdPtr XMLCALL
00953 xmlParseDTD (const xmlChar *ExternalID,
00954 const xmlChar *SystemID);
00955 XMLPUBFUN xmlDtdPtr XMLCALL
00956 xmlSAXParseDTD (xmlSAXHandlerPtr sax,
00957 const xmlChar *ExternalID,
00958 const xmlChar *SystemID);
00959 XMLPUBFUN xmlDtdPtr XMLCALL
00960 xmlIOParseDTD (xmlSAXHandlerPtr sax,
00961 xmlParserInputBufferPtr input,
00962 xmlCharEncoding enc);
00963 XMLPUBFUN int XMLCALL
00964 xmlParseBalancedChunkMemory(xmlDocPtr doc,
00965 xmlSAXHandlerPtr sax,
00966 void *user_data,
00967 int depth,
00968 const xmlChar *string,
00969 xmlNodePtr *lst);
00970 XMLPUBFUN int XMLCALL
00971 xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
00972 xmlSAXHandlerPtr sax,
00973 void *user_data,
00974 int depth,
00975 const xmlChar *string,
00976 xmlNodePtr *lst,
00977 int recover);
00978 XMLPUBFUN int XMLCALL
00979 xmlParseExternalEntity (xmlDocPtr doc,
00980 xmlSAXHandlerPtr sax,
00981 void *user_data,
00982 int depth,
00983 const xmlChar *URL,
00984 const xmlChar *ID,
00985 xmlNodePtr *lst);
00986 XMLPUBFUN int XMLCALL
00987 xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
00988 const xmlChar *URL,
00989 const xmlChar *ID,
00990 xmlNodePtr *lst);
00991
00992
00993
00994
00995 XMLPUBFUN xmlParserCtxtPtr XMLCALL
00996 xmlNewParserCtxt (void);
00997 XMLPUBFUN int XMLCALL
00998 xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
00999 XMLPUBFUN void XMLCALL
01000 xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
01001 XMLPUBFUN void XMLCALL
01002 xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
01003 XMLPUBFUN void XMLCALL
01004 xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
01005 const xmlChar* buffer,
01006 const char *filename);
01007 XMLPUBFUN xmlParserCtxtPtr XMLCALL
01008 xmlCreateDocParserCtxt (const xmlChar *cur);
01009
01010
01011
01012
01013
01014 XMLPUBFUN int XMLCALL
01015 xmlGetFeaturesList (int *len,
01016 const char **result);
01017 XMLPUBFUN int XMLCALL
01018 xmlGetFeature (xmlParserCtxtPtr ctxt,
01019 const char *name,
01020 void *result);
01021 XMLPUBFUN int XMLCALL
01022 xmlSetFeature (xmlParserCtxtPtr ctxt,
01023 const char *name,
01024 void *value);
01025
01026 #ifdef LIBXML_PUSH_ENABLED
01027
01028
01029
01030 XMLPUBFUN xmlParserCtxtPtr XMLCALL
01031 xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
01032 void *user_data,
01033 const char *chunk,
01034 int size,
01035 const char *filename);
01036 XMLPUBFUN int XMLCALL
01037 xmlParseChunk (xmlParserCtxtPtr ctxt,
01038 const char *chunk,
01039 int size,
01040 int terminate);
01041 #endif
01042
01043
01044
01045
01046
01047 XMLPUBFUN xmlParserCtxtPtr XMLCALL
01048 xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
01049 void *user_data,
01050 xmlInputReadCallback ioread,
01051 xmlInputCloseCallback ioclose,
01052 void *ioctx,
01053 xmlCharEncoding enc);
01054
01055 XMLPUBFUN xmlParserInputPtr XMLCALL
01056 xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
01057 xmlParserInputBufferPtr input,
01058 xmlCharEncoding enc);
01059
01060
01061
01062
01063 XMLPUBFUN const xmlParserNodeInfo* XMLCALL
01064 xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt,
01065 const xmlNodePtr node);
01066 XMLPUBFUN void XMLCALL
01067 xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
01068 XMLPUBFUN void XMLCALL
01069 xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
01070 XMLPUBFUN unsigned long XMLCALL
01071 xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
01072 const xmlNodePtr node);
01073 XMLPUBFUN void XMLCALL
01074 xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
01075 const xmlParserNodeInfoPtr info);
01076
01077
01078
01079
01080
01081 XMLPUBFUN void XMLCALL
01082 xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
01083 XMLPUBFUN xmlExternalEntityLoader XMLCALL
01084 xmlGetExternalEntityLoader(void);
01085 XMLPUBFUN xmlParserInputPtr XMLCALL
01086 xmlLoadExternalEntity (const char *URL,
01087 const char *ID,
01088 xmlParserCtxtPtr ctxt);
01089
01090
01091
01098 typedef enum {
01099 XML_PARSE_RECOVER = 1<<0,
01100 XML_PARSE_NOENT = 1<<1,
01101 XML_PARSE_DTDLOAD = 1<<2,
01102 XML_PARSE_DTDATTR = 1<<3,
01103 XML_PARSE_DTDVALID = 1<<4,
01104 XML_PARSE_NOERROR = 1<<5,
01105 XML_PARSE_NOWARNING = 1<<6,
01106 XML_PARSE_PEDANTIC = 1<<7,
01107 XML_PARSE_NOBLANKS = 1<<8,
01108 XML_PARSE_SAX1 = 1<<9,
01109 XML_PARSE_XINCLUDE = 1<<10,
01110 XML_PARSE_NONET = 1<<11,
01111 XML_PARSE_NODICT = 1<<12,
01112 XML_PARSE_NSCLEAN = 1<<13,
01113 XML_PARSE_NOCDATA = 1<<14
01114 } xmlParserOption;
01115
01116 XMLPUBFUN void XMLCALL
01117 xmlCtxtReset (xmlParserCtxtPtr ctxt);
01118 XMLPUBFUN int XMLCALL
01119 xmlCtxtResetPush (xmlParserCtxtPtr ctxt,
01120 const char *chunk,
01121 int size,
01122 const char *filename,
01123 const char *encoding);
01124 XMLPUBFUN int XMLCALL
01125 xmlCtxtUseOptions (xmlParserCtxtPtr ctxt,
01126 int options);
01127 XMLPUBFUN xmlDocPtr XMLCALL
01128 xmlReadDoc (const xmlChar *cur,
01129 const char *URL,
01130 const char *encoding,
01131 int options);
01132 XMLPUBFUN xmlDocPtr XMLCALL
01133 xmlReadFile (const char *URL,
01134 const char *encoding,
01135 int options);
01136 XMLPUBFUN xmlDocPtr XMLCALL
01137 xmlReadMemory (const char *buffer,
01138 int size,
01139 const char *URL,
01140 const char *encoding,
01141 int options);
01142 XMLPUBFUN xmlDocPtr XMLCALL
01143 xmlReadFd (int fd,
01144 const char *URL,
01145 const char *encoding,
01146 int options);
01147 XMLPUBFUN xmlDocPtr XMLCALL
01148 xmlReadIO (xmlInputReadCallback ioread,
01149 xmlInputCloseCallback ioclose,
01150 void *ioctx,
01151 const char *URL,
01152 const char *encoding,
01153 int options);
01154 XMLPUBFUN xmlDocPtr XMLCALL
01155 xmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
01156 const xmlChar *cur,
01157 const char *URL,
01158 const char *encoding,
01159 int options);
01160 XMLPUBFUN xmlDocPtr XMLCALL
01161 xmlCtxtReadFile (xmlParserCtxtPtr ctxt,
01162 const char *filename,
01163 const char *encoding,
01164 int options);
01165 XMLPUBFUN xmlDocPtr XMLCALL
01166 xmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
01167 const char *buffer,
01168 int size,
01169 const char *URL,
01170 const char *encoding,
01171 int options);
01172 XMLPUBFUN xmlDocPtr XMLCALL
01173 xmlCtxtReadFd (xmlParserCtxtPtr ctxt,
01174 int fd,
01175 const char *URL,
01176 const char *encoding,
01177 int options);
01178 XMLPUBFUN xmlDocPtr XMLCALL
01179 xmlCtxtReadIO (xmlParserCtxtPtr ctxt,
01180 xmlInputReadCallback ioread,
01181 xmlInputCloseCallback ioclose,
01182 void *ioctx,
01183 const char *URL,
01184 const char *encoding,
01185 int options);
01186
01187 #ifdef __cplusplus
01188 }
01189 #endif
01190 #endif
01191
01192