File indexing completed on 2026-09-10 09:14:14
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef __XML_PARSER_H__
0014 #define __XML_PARSER_H__
0015
0016 #include <libxml/xmlversion.h>
0017
0018 #define XML_TREE_INTERNALS
0019
0020 #include <libxml/tree.h>
0021 #undef XML_TREE_INTERNALS
0022 #include <libxml/dict.h>
0023 #include <libxml/hash.h>
0024 #include <libxml/valid.h>
0025 #include <libxml/entities.h>
0026 #include <libxml/xmlerror.h>
0027 #include <libxml/xmlstring.h>
0028 #include <libxml/xmlmemory.h>
0029 #include <libxml/encoding.h>
0030 #include <libxml/xmlIO.h>
0031
0032 #include <libxml/SAX2.h>
0033 #include <libxml/threads.h>
0034
0035 #ifdef __cplusplus
0036 extern "C" {
0037 #endif
0038
0039
0040
0041
0042 #define XML_DEFAULT_VERSION "1.0"
0043
0044
0045
0046
0047 typedef enum {
0048
0049 XML_STATUS_NOT_WELL_FORMED = (1 << 0),
0050
0051 XML_STATUS_NOT_NS_WELL_FORMED = (1 << 1),
0052
0053 XML_STATUS_DTD_VALIDATION_FAILED = (1 << 2),
0054
0055 XML_STATUS_CATASTROPHIC_ERROR = (1 << 3)
0056 } xmlParserStatus;
0057
0058
0059
0060
0061 typedef enum {
0062
0063 XML_RESOURCE_UNKNOWN = 0,
0064
0065 XML_RESOURCE_MAIN_DOCUMENT,
0066
0067 XML_RESOURCE_DTD,
0068
0069 XML_RESOURCE_GENERAL_ENTITY,
0070
0071 XML_RESOURCE_PARAMETER_ENTITY,
0072
0073 XML_RESOURCE_XINCLUDE,
0074
0075 XML_RESOURCE_XINCLUDE_TEXT
0076 } xmlResourceType;
0077
0078
0079
0080
0081 typedef enum {
0082
0083 XML_INPUT_BUF_STATIC = (1 << 1),
0084
0085
0086 XML_INPUT_BUF_ZERO_TERMINATED = (1 << 2),
0087
0088 XML_INPUT_UNZIP = (1 << 3),
0089
0090 XML_INPUT_NETWORK = (1 << 4),
0091
0092 XML_INPUT_USE_SYS_CATALOG = (1 << 5)
0093 } xmlParserInputFlags;
0094
0095
0096 typedef void (* xmlParserInputDeallocate)(xmlChar *str);
0097
0098
0099
0100
0101 struct _xmlParserInput {
0102
0103 xmlParserInputBuffer *buf XML_DEPRECATED_MEMBER;
0104
0105
0106
0107
0108
0109 const char *filename;
0110
0111 const char *directory XML_DEPRECATED_MEMBER;
0112
0113 const xmlChar *base;
0114
0115
0116
0117
0118
0119 const xmlChar *cur;
0120
0121 const xmlChar *end;
0122
0123 int length XML_DEPRECATED_MEMBER;
0124
0125
0126
0127
0128
0129 int line;
0130
0131
0132
0133
0134
0135 int col;
0136
0137
0138
0139
0140
0141 unsigned long consumed;
0142
0143 xmlParserInputDeallocate free XML_DEPRECATED_MEMBER;
0144
0145 const xmlChar *encoding XML_DEPRECATED_MEMBER;
0146
0147 const xmlChar *version XML_DEPRECATED_MEMBER;
0148
0149 int flags XML_DEPRECATED_MEMBER;
0150
0151 int id XML_DEPRECATED_MEMBER;
0152
0153 unsigned long parentConsumed XML_DEPRECATED_MEMBER;
0154
0155 xmlEntity *entity XML_DEPRECATED_MEMBER;
0156 };
0157
0158
0159
0160 typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
0161 typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
0162
0163 struct _xmlParserNodeInfo {
0164 const struct _xmlNode* node;
0165
0166 unsigned long begin_pos;
0167 unsigned long begin_line;
0168 unsigned long end_pos;
0169 unsigned long end_line;
0170 };
0171
0172 typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;
0173 typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;
0174 struct _xmlParserNodeInfoSeq {
0175 unsigned long maximum;
0176 unsigned long length;
0177 xmlParserNodeInfo* buffer;
0178 };
0179
0180
0181
0182
0183 typedef enum {
0184 XML_PARSER_EOF = -1,
0185 XML_PARSER_START = 0,
0186 XML_PARSER_MISC,
0187 XML_PARSER_PI,
0188 XML_PARSER_DTD,
0189 XML_PARSER_PROLOG,
0190 XML_PARSER_COMMENT,
0191 XML_PARSER_START_TAG,
0192 XML_PARSER_CONTENT,
0193 XML_PARSER_CDATA_SECTION,
0194 XML_PARSER_END_TAG,
0195 XML_PARSER_ENTITY_DECL,
0196 XML_PARSER_ENTITY_VALUE,
0197 XML_PARSER_ATTRIBUTE_VALUE,
0198 XML_PARSER_SYSTEM_LITERAL,
0199 XML_PARSER_EPILOG,
0200 XML_PARSER_IGNORE,
0201 XML_PARSER_PUBLIC_LITERAL,
0202 XML_PARSER_XML_DECL
0203 } xmlParserInputState;
0204
0205
0206
0207
0208 #define XML_DETECT_IDS 2
0209 #define XML_COMPLETE_ATTRS 4
0210 #define XML_SKIP_IDS 8
0211
0212
0213
0214
0215 typedef enum {
0216 XML_PARSE_UNKNOWN = 0,
0217 XML_PARSE_DOM = 1,
0218 XML_PARSE_SAX = 2,
0219 XML_PARSE_PUSH_DOM = 3,
0220 XML_PARSE_PUSH_SAX = 4,
0221 XML_PARSE_READER = 5
0222 } xmlParserMode;
0223
0224 typedef struct _xmlStartTag xmlStartTag;
0225 typedef struct _xmlParserNsData xmlParserNsData;
0226 typedef struct _xmlAttrHashBucket xmlAttrHashBucket;
0227
0228
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249 typedef xmlParserErrors
0250 (*xmlResourceLoader)(void *ctxt, const char *url, const char *publicId,
0251 xmlResourceType type, xmlParserInputFlags flags,
0252 xmlParserInput **out);
0253
0254
0255
0256
0257 struct _xmlParserCtxt {
0258
0259
0260
0261
0262
0263
0264 struct _xmlSAXHandler *sax;
0265
0266
0267
0268
0269
0270 void *userData;
0271
0272
0273
0274
0275
0276 xmlDoc *myDoc;
0277
0278
0279
0280
0281
0282 int wellFormed;
0283
0284
0285
0286
0287
0288 int replaceEntities XML_DEPRECATED_MEMBER;
0289
0290
0291
0292
0293
0294 xmlChar *version;
0295
0296
0297
0298
0299
0300 xmlChar *encoding;
0301
0302
0303
0304
0305
0306 int standalone;
0307
0308
0309
0310
0311
0312
0313 int html;
0314
0315
0316
0317
0318
0319
0320
0321 xmlParserInput *input;
0322
0323 int inputNr;
0324
0325 int inputMax XML_DEPRECATED_MEMBER;
0326
0327 xmlParserInput **inputTab;
0328
0329
0330
0331
0332
0333
0334
0335
0336 xmlNode *node;
0337
0338 int nodeNr XML_DEPRECATED_MEMBER;
0339
0340 int nodeMax XML_DEPRECATED_MEMBER;
0341
0342 xmlNode **nodeTab XML_DEPRECATED_MEMBER;
0343
0344
0345 int record_info;
0346
0347 xmlParserNodeInfoSeq node_seq XML_DEPRECATED_MEMBER;
0348
0349
0350
0351
0352
0353
0354 int errNo;
0355
0356
0357 int hasExternalSubset XML_DEPRECATED_MEMBER;
0358
0359 int hasPErefs XML_DEPRECATED_MEMBER;
0360
0361 int external XML_DEPRECATED_MEMBER;
0362
0363
0364
0365
0366
0367
0368 int valid;
0369
0370
0371
0372
0373
0374 int validate XML_DEPRECATED_MEMBER;
0375
0376
0377
0378
0379
0380 xmlValidCtxt vctxt;
0381
0382
0383 xmlParserInputState instate XML_DEPRECATED_MEMBER;
0384
0385 int token XML_DEPRECATED_MEMBER;
0386
0387
0388
0389
0390
0391
0392
0393 char *directory;
0394
0395
0396
0397
0398 const xmlChar *name XML_DEPRECATED_MEMBER;
0399
0400 int nameNr XML_DEPRECATED_MEMBER;
0401
0402 int nameMax XML_DEPRECATED_MEMBER;
0403
0404 const xmlChar **nameTab XML_DEPRECATED_MEMBER;
0405
0406
0407 long nbChars XML_DEPRECATED_MEMBER;
0408
0409 long checkIndex XML_DEPRECATED_MEMBER;
0410
0411
0412
0413
0414
0415 int keepBlanks XML_DEPRECATED_MEMBER;
0416
0417
0418
0419
0420
0421 int disableSAX XML_DEPRECATED_MEMBER;
0422
0423
0424
0425
0426
0427
0428
0429
0430
0431 int inSubset;
0432
0433
0434
0435
0436
0437
0438 const xmlChar *intSubName;
0439
0440
0441
0442
0443
0444
0445 xmlChar *extSubURI;
0446
0447
0448
0449
0450
0451
0452
0453 xmlChar *extSubSystem;
0454
0455
0456
0457
0458 int *space XML_DEPRECATED_MEMBER;
0459
0460 int spaceNr XML_DEPRECATED_MEMBER;
0461
0462 int spaceMax XML_DEPRECATED_MEMBER;
0463
0464 int *spaceTab XML_DEPRECATED_MEMBER;
0465
0466
0467 int depth XML_DEPRECATED_MEMBER;
0468
0469 xmlParserInput *entity XML_DEPRECATED_MEMBER;
0470
0471 int charset XML_DEPRECATED_MEMBER;
0472
0473 int nodelen XML_DEPRECATED_MEMBER;
0474 int nodemem XML_DEPRECATED_MEMBER;
0475
0476
0477
0478
0479
0480 int pedantic XML_DEPRECATED_MEMBER;
0481
0482
0483
0484
0485
0486 void *_private;
0487
0488
0489
0490
0491
0492
0493
0494
0495
0496
0497
0498
0499
0500
0501
0502 int loadsubset XML_DEPRECATED_MEMBER;
0503
0504 int linenumbers XML_DEPRECATED_MEMBER;
0505
0506
0507
0508
0509
0510 void *catalogs XML_DEPRECATED_MEMBER;
0511
0512
0513
0514
0515 int recovery XML_DEPRECATED_MEMBER;
0516
0517 int progressive XML_DEPRECATED_MEMBER;
0518
0519
0520
0521
0522
0523 xmlDict *dict;
0524
0525 const xmlChar **atts XML_DEPRECATED_MEMBER;
0526
0527 int maxatts XML_DEPRECATED_MEMBER;
0528
0529 int docdict XML_DEPRECATED_MEMBER;
0530
0531
0532
0533
0534 const xmlChar *str_xml XML_DEPRECATED_MEMBER;
0535 const xmlChar *str_xmlns XML_DEPRECATED_MEMBER;
0536 const xmlChar *str_xml_ns XML_DEPRECATED_MEMBER;
0537
0538
0539
0540
0541
0542
0543 int sax2 XML_DEPRECATED_MEMBER;
0544
0545 int nsNr XML_DEPRECATED_MEMBER;
0546
0547 int nsMax XML_DEPRECATED_MEMBER;
0548
0549 const xmlChar **nsTab XML_DEPRECATED_MEMBER;
0550
0551 unsigned *attallocs XML_DEPRECATED_MEMBER;
0552
0553 xmlStartTag *pushTab XML_DEPRECATED_MEMBER;
0554
0555 xmlHashTable *attsDefault XML_DEPRECATED_MEMBER;
0556
0557 xmlHashTable *attsSpecial XML_DEPRECATED_MEMBER;
0558
0559
0560
0561
0562
0563
0564 int nsWellFormed;
0565
0566
0567
0568
0569
0570 int options;
0571
0572
0573
0574
0575
0576
0577 int dictNames XML_DEPRECATED_MEMBER;
0578
0579
0580
0581
0582
0583
0584 int freeElemsNr XML_DEPRECATED_MEMBER;
0585
0586 xmlNode *freeElems XML_DEPRECATED_MEMBER;
0587
0588 int freeAttrsNr XML_DEPRECATED_MEMBER;
0589
0590 xmlAttr *freeAttrs XML_DEPRECATED_MEMBER;
0591
0592
0593
0594
0595
0596
0597 xmlError lastError XML_DEPRECATED_MEMBER;
0598
0599 xmlParserMode parseMode XML_DEPRECATED_MEMBER;
0600
0601 unsigned long nbentities XML_DEPRECATED_MEMBER;
0602
0603 unsigned long sizeentities XML_DEPRECATED_MEMBER;
0604
0605
0606
0607 xmlParserNodeInfo *nodeInfo XML_DEPRECATED_MEMBER;
0608
0609 int nodeInfoNr XML_DEPRECATED_MEMBER;
0610
0611 int nodeInfoMax XML_DEPRECATED_MEMBER;
0612
0613 xmlParserNodeInfo *nodeInfoTab XML_DEPRECATED_MEMBER;
0614
0615
0616 int input_id XML_DEPRECATED_MEMBER;
0617
0618 unsigned long sizeentcopy XML_DEPRECATED_MEMBER;
0619
0620
0621 int endCheckState XML_DEPRECATED_MEMBER;
0622
0623 unsigned short nbErrors XML_DEPRECATED_MEMBER;
0624
0625 unsigned short nbWarnings XML_DEPRECATED_MEMBER;
0626
0627 unsigned maxAmpl XML_DEPRECATED_MEMBER;
0628
0629
0630 xmlParserNsData *nsdb XML_DEPRECATED_MEMBER;
0631
0632 unsigned attrHashMax XML_DEPRECATED_MEMBER;
0633
0634 xmlAttrHashBucket *attrHash XML_DEPRECATED_MEMBER;
0635
0636 xmlStructuredErrorFunc errorHandler XML_DEPRECATED_MEMBER;
0637 void *errorCtxt XML_DEPRECATED_MEMBER;
0638
0639 xmlResourceLoader resourceLoader XML_DEPRECATED_MEMBER;
0640 void *resourceCtxt XML_DEPRECATED_MEMBER;
0641
0642 xmlCharEncConvImpl convImpl XML_DEPRECATED_MEMBER;
0643 void *convCtxt XML_DEPRECATED_MEMBER;
0644 };
0645
0646
0647
0648
0649 struct _xmlSAXLocator {
0650 const xmlChar *(*getPublicId)(void *ctx);
0651 const xmlChar *(*getSystemId)(void *ctx);
0652 int (*getLineNumber)(void *ctx);
0653 int (*getColumnNumber)(void *ctx);
0654 };
0655
0656
0657
0658
0659
0660
0661
0662
0663
0664
0665
0666
0667 typedef xmlParserInput *(*resolveEntitySAXFunc) (void *ctx,
0668 const xmlChar *publicId,
0669 const xmlChar *systemId);
0670
0671
0672
0673
0674
0675
0676
0677
0678 typedef void (*internalSubsetSAXFunc) (void *ctx,
0679 const xmlChar *name,
0680 const xmlChar *publicId,
0681 const xmlChar *systemId);
0682
0683
0684
0685
0686
0687
0688
0689
0690 typedef void (*externalSubsetSAXFunc) (void *ctx,
0691 const xmlChar *name,
0692 const xmlChar *publicId,
0693 const xmlChar *systemId);
0694
0695
0696
0697
0698
0699
0700
0701 typedef xmlEntity *(*getEntitySAXFunc) (void *ctx,
0702 const xmlChar *name);
0703
0704
0705
0706
0707
0708
0709
0710 typedef xmlEntity *(*getParameterEntitySAXFunc) (void *ctx,
0711 const xmlChar *name);
0712
0713
0714
0715
0716
0717
0718
0719
0720
0721
0722 typedef void (*entityDeclSAXFunc) (void *ctx,
0723 const xmlChar *name,
0724 int type,
0725 const xmlChar *publicId,
0726 const xmlChar *systemId,
0727 xmlChar *content);
0728
0729
0730
0731
0732
0733
0734
0735
0736 typedef void (*notationDeclSAXFunc)(void *ctx,
0737 const xmlChar *name,
0738 const xmlChar *publicId,
0739 const xmlChar *systemId);
0740
0741
0742
0743
0744
0745
0746
0747
0748
0749
0750
0751 typedef void (*attributeDeclSAXFunc)(void *ctx,
0752 const xmlChar *elem,
0753 const xmlChar *fullname,
0754 int type,
0755 int def,
0756 const xmlChar *defaultValue,
0757 xmlEnumeration *tree);
0758
0759
0760
0761
0762
0763
0764
0765
0766 typedef void (*elementDeclSAXFunc)(void *ctx,
0767 const xmlChar *name,
0768 int type,
0769 xmlElementContent *content);
0770
0771
0772
0773
0774
0775
0776
0777
0778
0779 typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
0780 const xmlChar *name,
0781 const xmlChar *publicId,
0782 const xmlChar *systemId,
0783 const xmlChar *notationName);
0784
0785
0786
0787
0788
0789
0790
0791
0792
0793
0794 typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
0795 xmlSAXLocator *loc);
0796
0797
0798
0799
0800
0801 typedef void (*startDocumentSAXFunc) (void *ctx);
0802
0803
0804
0805
0806
0807 typedef void (*endDocumentSAXFunc) (void *ctx);
0808
0809
0810
0811
0812
0813
0814
0815 typedef void (*startElementSAXFunc) (void *ctx,
0816 const xmlChar *name,
0817 const xmlChar **atts);
0818
0819
0820
0821
0822
0823
0824 typedef void (*endElementSAXFunc) (void *ctx,
0825 const xmlChar *name);
0826
0827
0828
0829
0830
0831
0832
0833
0834
0835 typedef void (*attributeSAXFunc) (void *ctx,
0836 const xmlChar *name,
0837 const xmlChar *value);
0838
0839
0840
0841
0842
0843
0844 typedef void (*referenceSAXFunc) (void *ctx,
0845 const xmlChar *name);
0846
0847
0848
0849
0850
0851
0852
0853 typedef void (*charactersSAXFunc) (void *ctx,
0854 const xmlChar *ch,
0855 int len);
0856
0857
0858
0859
0860
0861
0862
0863 typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
0864 const xmlChar *ch,
0865 int len);
0866
0867
0868
0869
0870
0871
0872
0873 typedef void (*processingInstructionSAXFunc) (void *ctx,
0874 const xmlChar *target,
0875 const xmlChar *data);
0876
0877
0878
0879
0880
0881
0882 typedef void (*commentSAXFunc) (void *ctx,
0883 const xmlChar *value);
0884
0885
0886
0887
0888
0889
0890
0891 typedef void (*cdataBlockSAXFunc) (
0892 void *ctx,
0893 const xmlChar *value,
0894 int len);
0895
0896
0897
0898
0899
0900
0901
0902 typedef void (*warningSAXFunc) (void *ctx,
0903 const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
0904
0905
0906
0907
0908
0909
0910
0911 typedef void (*errorSAXFunc) (void *ctx,
0912 const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
0913
0914
0915
0916
0917
0918
0919
0920 typedef void (*fatalErrorSAXFunc) (void *ctx,
0921 const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
0922
0923
0924
0925
0926
0927
0928 typedef int (*isStandaloneSAXFunc) (void *ctx);
0929
0930
0931
0932
0933
0934
0935 typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
0936
0937
0938
0939
0940
0941
0942
0943 typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
0944
0945
0946
0947
0948
0949
0950
0951
0952
0953 #define XML_SAX2_MAGIC 0xDEEDBEAF
0954
0955
0956
0957
0958
0959
0960
0961
0962
0963
0964
0965
0966
0967
0968
0969
0970
0971
0972
0973
0974 typedef void (*startElementNsSAX2Func) (void *ctx,
0975 const xmlChar *localname,
0976 const xmlChar *prefix,
0977 const xmlChar *URI,
0978 int nb_namespaces,
0979 const xmlChar **namespaces,
0980 int nb_attributes,
0981 int nb_defaulted,
0982 const xmlChar **attributes);
0983
0984
0985
0986
0987
0988
0989
0990
0991
0992
0993
0994
0995 typedef void (*endElementNsSAX2Func) (void *ctx,
0996 const xmlChar *localname,
0997 const xmlChar *prefix,
0998 const xmlChar *URI);
0999
1000
1001
1002
1003
1004
1005
1006
1007 struct _xmlSAXHandler {
1008
1009
1010
1011
1012
1013
1014 internalSubsetSAXFunc internalSubset;
1015
1016
1017
1018
1019 isStandaloneSAXFunc isStandalone;
1020
1021
1022
1023
1024 hasInternalSubsetSAXFunc hasInternalSubset;
1025
1026
1027
1028
1029 hasExternalSubsetSAXFunc hasExternalSubset;
1030
1031
1032
1033
1034
1035
1036 resolveEntitySAXFunc resolveEntity;
1037
1038
1039
1040
1041
1042 getEntitySAXFunc getEntity;
1043
1044
1045
1046
1047
1048 entityDeclSAXFunc entityDecl;
1049
1050
1051
1052
1053
1054 notationDeclSAXFunc notationDecl;
1055
1056
1057
1058
1059
1060 attributeDeclSAXFunc attributeDecl;
1061
1062
1063
1064
1065
1066 elementDeclSAXFunc elementDecl;
1067
1068
1069
1070
1071
1072 unparsedEntityDeclSAXFunc unparsedEntityDecl;
1073
1074
1075
1076
1077
1078
1079
1080 setDocumentLocatorSAXFunc setDocumentLocator;
1081
1082
1083
1084
1085
1086
1087 startDocumentSAXFunc startDocument;
1088
1089
1090
1091 endDocumentSAXFunc endDocument;
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107 startElementSAXFunc startElement;
1108
1109
1110
1111 endElementSAXFunc endElement;
1112
1113
1114
1115 referenceSAXFunc reference;
1116
1117
1118
1119 charactersSAXFunc characters;
1120
1121
1122
1123
1124
1125
1126
1127 ignorableWhitespaceSAXFunc ignorableWhitespace;
1128
1129
1130
1131 processingInstructionSAXFunc processingInstruction;
1132
1133
1134
1135 commentSAXFunc comment;
1136
1137
1138
1139 warningSAXFunc warning;
1140
1141
1142
1143 errorSAXFunc error;
1144
1145
1146
1147 fatalErrorSAXFunc fatalError;
1148
1149
1150
1151
1152
1153 getParameterEntitySAXFunc getParameterEntity;
1154
1155
1156
1157 cdataBlockSAXFunc cdataBlock;
1158
1159
1160
1161
1162
1163 externalSubsetSAXFunc externalSubset;
1164
1165
1166
1167
1168
1169
1170 unsigned int initialized;
1171
1172
1173
1174 void *_private;
1175
1176
1177
1178 startElementNsSAX2Func startElementNs;
1179
1180
1181
1182 endElementNsSAX2Func endElementNs;
1183
1184
1185
1186
1187
1188
1189 xmlStructuredErrorFunc serror;
1190 };
1191
1192
1193
1194
1195
1196
1197 typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1;
1198 typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr;
1199
1200
1201
1202
1203
1204 struct _xmlSAXHandlerV1 {
1205 internalSubsetSAXFunc internalSubset;
1206 isStandaloneSAXFunc isStandalone;
1207 hasInternalSubsetSAXFunc hasInternalSubset;
1208 hasExternalSubsetSAXFunc hasExternalSubset;
1209 resolveEntitySAXFunc resolveEntity;
1210 getEntitySAXFunc getEntity;
1211 entityDeclSAXFunc entityDecl;
1212 notationDeclSAXFunc notationDecl;
1213 attributeDeclSAXFunc attributeDecl;
1214 elementDeclSAXFunc elementDecl;
1215 unparsedEntityDeclSAXFunc unparsedEntityDecl;
1216 setDocumentLocatorSAXFunc setDocumentLocator;
1217 startDocumentSAXFunc startDocument;
1218 endDocumentSAXFunc endDocument;
1219 startElementSAXFunc startElement;
1220 endElementSAXFunc endElement;
1221 referenceSAXFunc reference;
1222 charactersSAXFunc characters;
1223 ignorableWhitespaceSAXFunc ignorableWhitespace;
1224 processingInstructionSAXFunc processingInstruction;
1225 commentSAXFunc comment;
1226 warningSAXFunc warning;
1227 errorSAXFunc error;
1228 fatalErrorSAXFunc fatalError;
1229 getParameterEntitySAXFunc getParameterEntity;
1230 cdataBlockSAXFunc cdataBlock;
1231 externalSubsetSAXFunc externalSubset;
1232 unsigned int initialized;
1233 };
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247 typedef xmlParserInput *(*xmlExternalEntityLoader) (const char *URL,
1248 const char *publicId,
1249 xmlParserCtxt *context);
1250
1251
1252
1253
1254
1255 XMLPUBVAR const char *const xmlParserVersion;
1256
1257
1258
1259 XML_DEPRECATED
1260 XMLPUBVAR const xmlSAXLocator xmlDefaultSAXLocator;
1261 #ifdef LIBXML_SAX1_ENABLED
1262
1263
1264
1265 XML_DEPRECATED
1266 XMLPUBVAR const xmlSAXHandlerV1 xmlDefaultSAXHandler;
1267 #endif
1268
1269 XML_DEPRECATED
1270 XMLPUBFUN int *__xmlDoValidityCheckingDefaultValue(void);
1271 XML_DEPRECATED
1272 XMLPUBFUN int *__xmlGetWarningsDefaultValue(void);
1273 XML_DEPRECATED
1274 XMLPUBFUN int *__xmlKeepBlanksDefaultValue(void);
1275 XML_DEPRECATED
1276 XMLPUBFUN int *__xmlLineNumbersDefaultValue(void);
1277 XML_DEPRECATED
1278 XMLPUBFUN int *__xmlLoadExtDtdDefaultValue(void);
1279 XML_DEPRECATED
1280 XMLPUBFUN int *__xmlPedanticParserDefaultValue(void);
1281 XML_DEPRECATED
1282 XMLPUBFUN int *__xmlSubstituteEntitiesDefaultValue(void);
1283
1284 #ifdef LIBXML_OUTPUT_ENABLED
1285 XML_DEPRECATED
1286 XMLPUBFUN int *__xmlIndentTreeOutput(void);
1287 XML_DEPRECATED
1288 XMLPUBFUN const char **__xmlTreeIndentString(void);
1289 XML_DEPRECATED
1290 XMLPUBFUN int *__xmlSaveNoEmptyTags(void);
1291 #endif
1292
1293
1294
1295 #ifndef XML_GLOBALS_NO_REDEFINITION
1296
1297
1298
1299
1300
1301 #define xmlDoValidityCheckingDefaultValue \
1302 (*__xmlDoValidityCheckingDefaultValue())
1303
1304
1305
1306
1307
1308 #define xmlGetWarningsDefaultValue \
1309 (*__xmlGetWarningsDefaultValue())
1310
1311
1312
1313
1314
1315
1316 #define xmlKeepBlanksDefaultValue (*__xmlKeepBlanksDefaultValue())
1317
1318
1319
1320
1321
1322
1323 #define xmlLineNumbersDefaultValue \
1324 (*__xmlLineNumbersDefaultValue())
1325
1326
1327
1328
1329
1330
1331 #define xmlLoadExtDtdDefaultValue (*__xmlLoadExtDtdDefaultValue())
1332
1333
1334
1335
1336
1337
1338 #define xmlPedanticParserDefaultValue \
1339 (*__xmlPedanticParserDefaultValue())
1340
1341
1342
1343
1344
1345
1346 #define xmlSubstituteEntitiesDefaultValue \
1347 (*__xmlSubstituteEntitiesDefaultValue())
1348 #ifdef LIBXML_OUTPUT_ENABLED
1349
1350
1351
1352
1353
1354
1355
1356 #define xmlIndentTreeOutput (*__xmlIndentTreeOutput())
1357
1358
1359
1360
1361
1362
1363
1364 #define xmlTreeIndentString (*__xmlTreeIndentString())
1365
1366
1367
1368
1369
1370
1371
1372 #define xmlSaveNoEmptyTags (*__xmlSaveNoEmptyTags())
1373 #endif
1374 #endif
1375
1376
1377
1378
1379 XMLPUBFUN void
1380 xmlInitParser (void);
1381 XMLPUBFUN void
1382 xmlCleanupParser (void);
1383 XML_DEPRECATED
1384 XMLPUBFUN void
1385 xmlInitGlobals (void);
1386 XML_DEPRECATED
1387 XMLPUBFUN void
1388 xmlCleanupGlobals (void);
1389
1390
1391
1392
1393 XML_DEPRECATED
1394 XMLPUBFUN int
1395 xmlParserInputRead (xmlParserInput *in,
1396 int len);
1397 XMLPUBFUN int
1398 xmlParserInputGrow (xmlParserInput *in,
1399 int len);
1400
1401
1402
1403
1404 #ifdef LIBXML_SAX1_ENABLED
1405 XMLPUBFUN xmlDoc *
1406 xmlParseDoc (const xmlChar *cur);
1407 XMLPUBFUN xmlDoc *
1408 xmlParseFile (const char *filename);
1409 XMLPUBFUN xmlDoc *
1410 xmlParseMemory (const char *buffer,
1411 int size);
1412 #endif
1413 XML_DEPRECATED
1414 XMLPUBFUN int
1415 xmlSubstituteEntitiesDefault(int val);
1416 XMLPUBFUN int
1417 xmlKeepBlanksDefault (int val);
1418 XMLPUBFUN void
1419 xmlStopParser (xmlParserCtxt *ctxt);
1420 XML_DEPRECATED
1421 XMLPUBFUN int
1422 xmlPedanticParserDefault(int val);
1423 XML_DEPRECATED
1424 XMLPUBFUN int
1425 xmlLineNumbersDefault (int val);
1426
1427 XML_DEPRECATED
1428 XMLPUBFUN int
1429 xmlThrDefSubstituteEntitiesDefaultValue(int v);
1430 XML_DEPRECATED
1431 XMLPUBFUN int
1432 xmlThrDefKeepBlanksDefaultValue(int v);
1433 XML_DEPRECATED
1434 XMLPUBFUN int
1435 xmlThrDefPedanticParserDefaultValue(int v);
1436 XML_DEPRECATED
1437 XMLPUBFUN int
1438 xmlThrDefLineNumbersDefaultValue(int v);
1439 XML_DEPRECATED
1440 XMLPUBFUN int
1441 xmlThrDefDoValidityCheckingDefaultValue(int v);
1442 XML_DEPRECATED
1443 XMLPUBFUN int
1444 xmlThrDefGetWarningsDefaultValue(int v);
1445 XML_DEPRECATED
1446 XMLPUBFUN int
1447 xmlThrDefLoadExtDtdDefaultValue(int v);
1448
1449 #ifdef LIBXML_SAX1_ENABLED
1450
1451
1452
1453 XML_DEPRECATED
1454 XMLPUBFUN xmlDoc *
1455 xmlRecoverDoc (const xmlChar *cur);
1456 XML_DEPRECATED
1457 XMLPUBFUN xmlDoc *
1458 xmlRecoverMemory (const char *buffer,
1459 int size);
1460 XML_DEPRECATED
1461 XMLPUBFUN xmlDoc *
1462 xmlRecoverFile (const char *filename);
1463 #endif
1464
1465
1466
1467
1468 XMLPUBFUN int
1469 xmlParseDocument (xmlParserCtxt *ctxt);
1470 XML_DEPRECATED
1471 XMLPUBFUN int
1472 xmlParseExtParsedEnt (xmlParserCtxt *ctxt);
1473 #ifdef LIBXML_SAX1_ENABLED
1474 XML_DEPRECATED
1475 XMLPUBFUN int
1476 xmlSAXUserParseFile (xmlSAXHandler *sax,
1477 void *user_data,
1478 const char *filename);
1479 XML_DEPRECATED
1480 XMLPUBFUN int
1481 xmlSAXUserParseMemory (xmlSAXHandler *sax,
1482 void *user_data,
1483 const char *buffer,
1484 int size);
1485 XML_DEPRECATED
1486 XMLPUBFUN xmlDoc *
1487 xmlSAXParseDoc (xmlSAXHandler *sax,
1488 const xmlChar *cur,
1489 int recovery);
1490 XML_DEPRECATED
1491 XMLPUBFUN xmlDoc *
1492 xmlSAXParseMemory (xmlSAXHandler *sax,
1493 const char *buffer,
1494 int size,
1495 int recovery);
1496 XML_DEPRECATED
1497 XMLPUBFUN xmlDoc *
1498 xmlSAXParseMemoryWithData (xmlSAXHandler *sax,
1499 const char *buffer,
1500 int size,
1501 int recovery,
1502 void *data);
1503 XML_DEPRECATED
1504 XMLPUBFUN xmlDoc *
1505 xmlSAXParseFile (xmlSAXHandler *sax,
1506 const char *filename,
1507 int recovery);
1508 XML_DEPRECATED
1509 XMLPUBFUN xmlDoc *
1510 xmlSAXParseFileWithData (xmlSAXHandler *sax,
1511 const char *filename,
1512 int recovery,
1513 void *data);
1514 XML_DEPRECATED
1515 XMLPUBFUN xmlDoc *
1516 xmlSAXParseEntity (xmlSAXHandler *sax,
1517 const char *filename);
1518 XML_DEPRECATED
1519 XMLPUBFUN xmlDoc *
1520 xmlParseEntity (const char *filename);
1521 #endif
1522
1523 #ifdef LIBXML_VALID_ENABLED
1524 XMLPUBFUN xmlDtd *
1525 xmlCtxtParseDtd (xmlParserCtxt *ctxt,
1526 xmlParserInput *input,
1527 const xmlChar *publicId,
1528 const xmlChar *systemId);
1529 XMLPUBFUN int
1530 xmlCtxtValidateDocument (xmlParserCtxt *ctxt,
1531 xmlDoc *doc);
1532 XMLPUBFUN int
1533 xmlCtxtValidateDtd (xmlParserCtxt *ctxt,
1534 xmlDoc *doc,
1535 xmlDtd *dtd);
1536 XML_DEPRECATED
1537 XMLPUBFUN xmlDtd *
1538 xmlSAXParseDTD (xmlSAXHandler *sax,
1539 const xmlChar *publicId,
1540 const xmlChar *systemId);
1541 XMLPUBFUN xmlDtd *
1542 xmlParseDTD (const xmlChar *publicId,
1543 const xmlChar *systemId);
1544 XMLPUBFUN xmlDtd *
1545 xmlIOParseDTD (xmlSAXHandler *sax,
1546 xmlParserInputBuffer *input,
1547 xmlCharEncoding enc);
1548 #endif
1549 #ifdef LIBXML_SAX1_ENABLED
1550 XMLPUBFUN int
1551 xmlParseBalancedChunkMemory(xmlDoc *doc,
1552 xmlSAXHandler *sax,
1553 void *user_data,
1554 int depth,
1555 const xmlChar *string,
1556 xmlNode **lst);
1557 #endif
1558 XMLPUBFUN xmlParserErrors
1559 xmlParseInNodeContext (xmlNode *node,
1560 const char *data,
1561 int datalen,
1562 int options,
1563 xmlNode **lst);
1564 #ifdef LIBXML_SAX1_ENABLED
1565 XMLPUBFUN int
1566 xmlParseBalancedChunkMemoryRecover(xmlDoc *doc,
1567 xmlSAXHandler *sax,
1568 void *user_data,
1569 int depth,
1570 const xmlChar *string,
1571 xmlNode **lst,
1572 int recover);
1573 XML_DEPRECATED
1574 XMLPUBFUN int
1575 xmlParseExternalEntity (xmlDoc *doc,
1576 xmlSAXHandler *sax,
1577 void *user_data,
1578 int depth,
1579 const xmlChar *URL,
1580 const xmlChar *ID,
1581 xmlNode **lst);
1582 #endif
1583 XMLPUBFUN int
1584 xmlParseCtxtExternalEntity(xmlParserCtxt *ctx,
1585 const xmlChar *URL,
1586 const xmlChar *ID,
1587 xmlNode **lst);
1588
1589
1590
1591
1592 XMLPUBFUN xmlParserCtxt *
1593 xmlNewParserCtxt (void);
1594 XMLPUBFUN xmlParserCtxt *
1595 xmlNewSAXParserCtxt (const xmlSAXHandler *sax,
1596 void *userData);
1597 XMLPUBFUN int
1598 xmlInitParserCtxt (xmlParserCtxt *ctxt);
1599 XML_DEPRECATED
1600 XMLPUBFUN void
1601 xmlClearParserCtxt (xmlParserCtxt *ctxt);
1602 XMLPUBFUN void
1603 xmlFreeParserCtxt (xmlParserCtxt *ctxt);
1604 #ifdef LIBXML_SAX1_ENABLED
1605 XML_DEPRECATED
1606 XMLPUBFUN void
1607 xmlSetupParserForBuffer (xmlParserCtxt *ctxt,
1608 const xmlChar* buffer,
1609 const char *filename);
1610 #endif
1611 XMLPUBFUN xmlParserCtxt *
1612 xmlCreateDocParserCtxt (const xmlChar *cur);
1613
1614 #ifdef LIBXML_PUSH_ENABLED
1615
1616
1617
1618 XMLPUBFUN xmlParserCtxt *
1619 xmlCreatePushParserCtxt(xmlSAXHandler *sax,
1620 void *user_data,
1621 const char *chunk,
1622 int size,
1623 const char *filename);
1624 XMLPUBFUN int
1625 xmlParseChunk (xmlParserCtxt *ctxt,
1626 const char *chunk,
1627 int size,
1628 int terminate);
1629 #endif
1630
1631
1632
1633
1634
1635 XMLPUBFUN xmlParserCtxt *
1636 xmlCreateIOParserCtxt (xmlSAXHandler *sax,
1637 void *user_data,
1638 xmlInputReadCallback ioread,
1639 xmlInputCloseCallback ioclose,
1640 void *ioctx,
1641 xmlCharEncoding enc);
1642
1643 XMLPUBFUN xmlParserInput *
1644 xmlNewIOInputStream (xmlParserCtxt *ctxt,
1645 xmlParserInputBuffer *input,
1646 xmlCharEncoding enc);
1647
1648
1649
1650
1651 XML_DEPRECATED
1652 XMLPUBFUN const xmlParserNodeInfo*
1653 xmlParserFindNodeInfo (xmlParserCtxt *ctxt,
1654 xmlNode *node);
1655 XML_DEPRECATED
1656 XMLPUBFUN void
1657 xmlInitNodeInfoSeq (xmlParserNodeInfoSeq *seq);
1658 XML_DEPRECATED
1659 XMLPUBFUN void
1660 xmlClearNodeInfoSeq (xmlParserNodeInfoSeq *seq);
1661 XML_DEPRECATED
1662 XMLPUBFUN unsigned long
1663 xmlParserFindNodeInfoIndex(xmlParserNodeInfoSeq *seq,
1664 xmlNode *node);
1665 XML_DEPRECATED
1666 XMLPUBFUN void
1667 xmlParserAddNodeInfo (xmlParserCtxt *ctxt,
1668 xmlParserNodeInfo *info);
1669
1670
1671
1672
1673
1674 XMLPUBFUN void
1675 xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
1676 XMLPUBFUN xmlExternalEntityLoader
1677 xmlGetExternalEntityLoader(void);
1678 XMLPUBFUN xmlParserInput *
1679 xmlLoadExternalEntity (const char *URL,
1680 const char *ID,
1681 xmlParserCtxt *ctxt);
1682
1683 XML_DEPRECATED
1684 XMLPUBFUN long
1685 xmlByteConsumed (xmlParserCtxt *ctxt);
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695 typedef enum {
1696
1697
1698
1699
1700
1701
1702
1703 XML_PARSE_RECOVER = 1<<0,
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715 XML_PARSE_NOENT = 1<<1,
1716
1717
1718
1719
1720
1721 XML_PARSE_DTDLOAD = 1<<2,
1722
1723
1724
1725
1726
1727
1728 XML_PARSE_DTDATTR = 1<<3,
1729
1730
1731
1732
1733
1734
1735
1736
1737 XML_PARSE_DTDVALID = 1<<4,
1738
1739
1740
1741
1742 XML_PARSE_NOERROR = 1<<5,
1743
1744
1745
1746 XML_PARSE_NOWARNING = 1<<6,
1747
1748
1749
1750 XML_PARSE_PEDANTIC = 1<<7,
1751
1752
1753
1754
1755
1756
1757
1758
1759 XML_PARSE_NOBLANKS = 1<<8,
1760
1761
1762
1763
1764
1765
1766 XML_PARSE_SAX1 = 1<<9,
1767
1768
1769
1770
1771 XML_PARSE_XINCLUDE = 1<<10,
1772
1773
1774
1775
1776
1777
1778
1779 XML_PARSE_NONET = 1<<11,
1780
1781
1782
1783
1784 XML_PARSE_NODICT = 1<<12,
1785
1786
1787
1788
1789 XML_PARSE_NSCLEAN = 1<<13,
1790
1791
1792
1793 XML_PARSE_NOCDATA = 1<<14,
1794
1795
1796
1797
1798
1799 XML_PARSE_NOXINCNODE = 1<<15,
1800
1801
1802
1803
1804 XML_PARSE_COMPACT = 1<<16,
1805
1806
1807
1808
1809
1810 XML_PARSE_OLD10 = 1<<17,
1811
1812
1813
1814
1815 XML_PARSE_NOBASEFIX = 1<<18,
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840 XML_PARSE_HUGE = 1<<19,
1841
1842
1843
1844
1845
1846 XML_PARSE_OLDSAX = 1<<20,
1847
1848
1849
1850
1851
1852 XML_PARSE_IGNORE_ENC = 1<<21,
1853
1854
1855
1856 XML_PARSE_BIG_LINES = 1<<22,
1857
1858
1859
1860
1861
1862 XML_PARSE_NO_XXE = 1<<23,
1863
1864
1865
1866
1867
1868
1869 XML_PARSE_UNZIP = 1<<24,
1870
1871
1872
1873
1874
1875 XML_PARSE_NO_SYS_CATALOG = 1<<25,
1876
1877
1878
1879
1880
1881 XML_PARSE_CATALOG_PI = 1<<26,
1882
1883
1884
1885
1886
1887 XML_PARSE_SKIP_IDS = 1<<27
1888 } xmlParserOption;
1889
1890 XMLPUBFUN void
1891 xmlCtxtReset (xmlParserCtxt *ctxt);
1892 XMLPUBFUN int
1893 xmlCtxtResetPush (xmlParserCtxt *ctxt,
1894 const char *chunk,
1895 int size,
1896 const char *filename,
1897 const char *encoding);
1898 XMLPUBFUN int
1899 xmlCtxtGetOptions (xmlParserCtxt *ctxt);
1900 XMLPUBFUN int
1901 xmlCtxtSetOptions (xmlParserCtxt *ctxt,
1902 int options);
1903 XMLPUBFUN int
1904 xmlCtxtUseOptions (xmlParserCtxt *ctxt,
1905 int options);
1906 XMLPUBFUN void *
1907 xmlCtxtGetPrivate (xmlParserCtxt *ctxt);
1908 XMLPUBFUN void
1909 xmlCtxtSetPrivate (xmlParserCtxt *ctxt,
1910 void *priv);
1911 XMLPUBFUN void *
1912 xmlCtxtGetCatalogs (xmlParserCtxt *ctxt);
1913 XMLPUBFUN void
1914 xmlCtxtSetCatalogs (xmlParserCtxt *ctxt,
1915 void *catalogs);
1916 XMLPUBFUN xmlDict *
1917 xmlCtxtGetDict (xmlParserCtxt *ctxt);
1918 XMLPUBFUN void
1919 xmlCtxtSetDict (xmlParserCtxt *ctxt,
1920 xmlDict *);
1921 XMLPUBFUN xmlSAXHandler *
1922 xmlCtxtGetSaxHandler (xmlParserCtxt *ctxt);
1923 XMLPUBFUN int
1924 xmlCtxtSetSaxHandler (xmlParserCtxt *ctxt,
1925 const xmlSAXHandler *sax);
1926 XMLPUBFUN xmlDoc *
1927 xmlCtxtGetDocument (xmlParserCtxt *ctxt);
1928 XMLPUBFUN int
1929 xmlCtxtIsHtml (xmlParserCtxt *ctxt);
1930 XMLPUBFUN int
1931 xmlCtxtIsStopped (xmlParserCtxt *ctxt);
1932 XMLPUBFUN int
1933 xmlCtxtIsInSubset (xmlParserCtxt *ctxt);
1934 #ifdef LIBXML_VALID_ENABLED
1935 XMLPUBFUN xmlValidCtxt *
1936 xmlCtxtGetValidCtxt (xmlParserCtxt *ctxt);
1937 #endif
1938 XMLPUBFUN const xmlChar *
1939 xmlCtxtGetVersion (xmlParserCtxt *ctxt);
1940 XMLPUBFUN const xmlChar *
1941 xmlCtxtGetDeclaredEncoding(xmlParserCtxt *ctxt);
1942 XMLPUBFUN int
1943 xmlCtxtGetStandalone (xmlParserCtxt *ctxt);
1944 XMLPUBFUN xmlParserStatus
1945 xmlCtxtGetStatus (xmlParserCtxt *ctxt);
1946 XMLPUBFUN void *
1947 xmlCtxtGetUserData (xmlParserCtxt *ctxt);
1948 XMLPUBFUN xmlNode *
1949 xmlCtxtGetNode (xmlParserCtxt *ctxt);
1950 XMLPUBFUN int
1951 xmlCtxtGetDocTypeDecl (xmlParserCtxt *ctxt,
1952 const xmlChar **name,
1953 const xmlChar **systemId,
1954 const xmlChar **publicId);
1955 XMLPUBFUN int
1956 xmlCtxtGetInputPosition (xmlParserCtxt *ctxt,
1957 int inputIndex,
1958 const char **filname,
1959 int *line,
1960 int *col,
1961 unsigned long *bytePos);
1962 XMLPUBFUN int
1963 xmlCtxtGetInputWindow (xmlParserCtxt *ctxt,
1964 int inputIndex,
1965 const xmlChar **startOut,
1966 int *sizeInOut,
1967 int *offsetOut);
1968 XMLPUBFUN void
1969 xmlCtxtSetErrorHandler (xmlParserCtxt *ctxt,
1970 xmlStructuredErrorFunc handler,
1971 void *data);
1972 XMLPUBFUN void
1973 xmlCtxtSetResourceLoader(xmlParserCtxt *ctxt,
1974 xmlResourceLoader loader,
1975 void *vctxt);
1976 XMLPUBFUN void
1977 xmlCtxtSetCharEncConvImpl(xmlParserCtxt *ctxt,
1978 xmlCharEncConvImpl impl,
1979 void *vctxt);
1980 XMLPUBFUN void
1981 xmlCtxtSetMaxAmplification(xmlParserCtxt *ctxt,
1982 unsigned maxAmpl);
1983 XMLPUBFUN xmlDoc *
1984 xmlReadDoc (const xmlChar *cur,
1985 const char *URL,
1986 const char *encoding,
1987 int options);
1988 XMLPUBFUN xmlDoc *
1989 xmlReadFile (const char *URL,
1990 const char *encoding,
1991 int options);
1992 XMLPUBFUN xmlDoc *
1993 xmlReadMemory (const char *buffer,
1994 int size,
1995 const char *URL,
1996 const char *encoding,
1997 int options);
1998 XMLPUBFUN xmlDoc *
1999 xmlReadFd (int fd,
2000 const char *URL,
2001 const char *encoding,
2002 int options);
2003 XMLPUBFUN xmlDoc *
2004 xmlReadIO (xmlInputReadCallback ioread,
2005 xmlInputCloseCallback ioclose,
2006 void *ioctx,
2007 const char *URL,
2008 const char *encoding,
2009 int options);
2010 XMLPUBFUN xmlDoc *
2011 xmlCtxtParseDocument (xmlParserCtxt *ctxt,
2012 xmlParserInput *input);
2013 XMLPUBFUN xmlNode *
2014 xmlCtxtParseContent (xmlParserCtxt *ctxt,
2015 xmlParserInput *input,
2016 xmlNode *node,
2017 int hasTextDecl);
2018 XMLPUBFUN xmlDoc *
2019 xmlCtxtReadDoc (xmlParserCtxt *ctxt,
2020 const xmlChar *cur,
2021 const char *URL,
2022 const char *encoding,
2023 int options);
2024 XMLPUBFUN xmlDoc *
2025 xmlCtxtReadFile (xmlParserCtxt *ctxt,
2026 const char *filename,
2027 const char *encoding,
2028 int options);
2029 XMLPUBFUN xmlDoc *
2030 xmlCtxtReadMemory (xmlParserCtxt *ctxt,
2031 const char *buffer,
2032 int size,
2033 const char *URL,
2034 const char *encoding,
2035 int options);
2036 XMLPUBFUN xmlDoc *
2037 xmlCtxtReadFd (xmlParserCtxt *ctxt,
2038 int fd,
2039 const char *URL,
2040 const char *encoding,
2041 int options);
2042 XMLPUBFUN xmlDoc *
2043 xmlCtxtReadIO (xmlParserCtxt *ctxt,
2044 xmlInputReadCallback ioread,
2045 xmlInputCloseCallback ioclose,
2046 void *ioctx,
2047 const char *URL,
2048 const char *encoding,
2049 int options);
2050
2051
2052
2053
2054
2055 XMLPUBFUN xmlParserErrors
2056 xmlNewInputFromUrl(const char *url, xmlParserInputFlags flags,
2057 xmlParserInput **out);
2058 XMLPUBFUN xmlParserInput *
2059 xmlNewInputFromMemory(const char *url, const void *mem, size_t size,
2060 xmlParserInputFlags flags);
2061 XMLPUBFUN xmlParserInput *
2062 xmlNewInputFromString(const char *url, const char *str,
2063 xmlParserInputFlags flags);
2064 XMLPUBFUN xmlParserInput *
2065 xmlNewInputFromFd(const char *url, int fd, xmlParserInputFlags flags);
2066 XMLPUBFUN xmlParserInput *
2067 xmlNewInputFromIO(const char *url, xmlInputReadCallback ioRead,
2068 xmlInputCloseCallback ioClose, void *ioCtxt,
2069 xmlParserInputFlags flags);
2070 XMLPUBFUN xmlParserErrors
2071 xmlInputSetEncodingHandler(xmlParserInput *input,
2072 xmlCharEncodingHandler *handler);
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083 typedef enum {
2084
2085 XML_WITH_THREAD = 1,
2086
2087 XML_WITH_TREE = 2,
2088
2089 XML_WITH_OUTPUT = 3,
2090
2091 XML_WITH_PUSH = 4,
2092
2093 XML_WITH_READER = 5,
2094
2095 XML_WITH_PATTERN = 6,
2096
2097 XML_WITH_WRITER = 7,
2098
2099 XML_WITH_SAX1 = 8,
2100
2101 XML_WITH_FTP = 9,
2102
2103 XML_WITH_HTTP = 10,
2104
2105 XML_WITH_VALID = 11,
2106
2107 XML_WITH_HTML = 12,
2108
2109 XML_WITH_LEGACY = 13,
2110
2111 XML_WITH_C14N = 14,
2112
2113 XML_WITH_CATALOG = 15,
2114
2115 XML_WITH_XPATH = 16,
2116
2117 XML_WITH_XPTR = 17,
2118
2119 XML_WITH_XINCLUDE = 18,
2120
2121 XML_WITH_ICONV = 19,
2122
2123 XML_WITH_ISO8859X = 20,
2124
2125 XML_WITH_UNICODE = 21,
2126
2127 XML_WITH_REGEXP = 22,
2128
2129 XML_WITH_AUTOMATA = 23,
2130
2131 XML_WITH_EXPR = 24,
2132
2133 XML_WITH_SCHEMAS = 25,
2134
2135 XML_WITH_SCHEMATRON = 26,
2136
2137 XML_WITH_MODULES = 27,
2138
2139 XML_WITH_DEBUG = 28,
2140
2141 XML_WITH_DEBUG_MEM = 29,
2142
2143 XML_WITH_DEBUG_RUN = 30,
2144
2145 XML_WITH_ZLIB = 31,
2146
2147 XML_WITH_ICU = 32,
2148
2149 XML_WITH_LZMA = 33,
2150
2151 XML_WITH_RELAXNG = 34,
2152 XML_WITH_NONE = 99999
2153 } xmlFeature;
2154
2155 XMLPUBFUN int
2156 xmlHasFeature (xmlFeature feature);
2157
2158 #ifdef __cplusplus
2159 }
2160 #endif
2161 #endif