File indexing completed on 2025-02-22 10:41:49
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef __XML_PARSER_INTERNALS_H__
0013 #define __XML_PARSER_INTERNALS_H__
0014
0015 #include <libxml/xmlversion.h>
0016 #include <libxml/parser.h>
0017 #include <libxml/HTMLparser.h>
0018 #include <libxml/chvalid.h>
0019 #include <libxml/SAX2.h>
0020
0021 #ifdef __cplusplus
0022 extern "C" {
0023 #endif
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 XML_DEPRECATED
0035 XMLPUBVAR const unsigned int xmlParserMaxDepth;
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045 #define XML_MAX_TEXT_LENGTH 10000000
0046
0047
0048
0049
0050
0051
0052 #define XML_MAX_HUGE_LENGTH 1000000000
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064 #define XML_MAX_NAME_LENGTH 50000
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074 #define XML_MAX_DICTIONARY_LIMIT 10000000
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084 #define XML_MAX_LOOKUP_LIMIT 10000000
0085
0086
0087
0088
0089
0090
0091
0092 #define XML_MAX_NAMELEN 100
0093
0094
0095
0096
0097
0098
0099
0100 #define INPUT_CHUNK 250
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116 #define IS_BYTE_CHAR(c) xmlIsChar_ch(c)
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128 #define IS_CHAR(c) xmlIsCharQ(c)
0129
0130
0131
0132
0133
0134
0135
0136 #define IS_CHAR_CH(c) xmlIsChar_ch(c)
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146 #define IS_BLANK(c) xmlIsBlankQ(c)
0147
0148
0149
0150
0151
0152
0153
0154 #define IS_BLANK_CH(c) xmlIsBlank_ch(c)
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164 #define IS_BASECHAR(c) xmlIsBaseCharQ(c)
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174 #define IS_DIGIT(c) xmlIsDigitQ(c)
0175
0176
0177
0178
0179
0180
0181
0182 #define IS_DIGIT_CH(c) xmlIsDigit_ch(c)
0183
0184
0185
0186
0187
0188
0189
0190
0191
0192 #define IS_COMBINING(c) xmlIsCombiningQ(c)
0193
0194
0195
0196
0197
0198
0199
0200 #define IS_COMBINING_CH(c) 0
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213 #define IS_EXTENDER(c) xmlIsExtenderQ(c)
0214
0215
0216
0217
0218
0219
0220
0221 #define IS_EXTENDER_CH(c) xmlIsExtender_ch(c)
0222
0223
0224
0225
0226
0227
0228
0229
0230
0231
0232 #define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243 #define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
0244
0245
0246
0247
0248
0249
0250
0251
0252 #define IS_LETTER_CH(c) xmlIsBaseChar_ch(c)
0253
0254
0255
0256
0257
0258
0259
0260
0261 #define IS_ASCII_LETTER(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
0262 ((0x61 <= (c)) && ((c) <= 0x7a)))
0263
0264
0265
0266
0267
0268
0269
0270
0271 #define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39))
0272
0273
0274
0275
0276
0277
0278
0279
0280
0281
0282 #define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c)
0283
0284
0285
0286
0287
0288
0289
0290 #define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
0291
0292
0293
0294
0295 XMLPUBVAR const xmlChar xmlStringText[];
0296 XMLPUBVAR const xmlChar xmlStringTextNoenc[];
0297 XMLPUBVAR const xmlChar xmlStringComment[];
0298
0299
0300
0301
0302 XMLPUBFUN int xmlIsLetter (int c);
0303
0304
0305
0306
0307 XMLPUBFUN xmlParserCtxtPtr
0308 xmlCreateFileParserCtxt (const char *filename);
0309 XMLPUBFUN xmlParserCtxtPtr
0310 xmlCreateURLParserCtxt (const char *filename,
0311 int options);
0312 XMLPUBFUN xmlParserCtxtPtr
0313 xmlCreateMemoryParserCtxt(const char *buffer,
0314 int size);
0315 XMLPUBFUN xmlParserCtxtPtr
0316 xmlCreateEntityParserCtxt(const xmlChar *URL,
0317 const xmlChar *ID,
0318 const xmlChar *base);
0319 XMLPUBFUN void
0320 xmlCtxtErrMemory (xmlParserCtxtPtr ctxt);
0321 XMLPUBFUN int
0322 xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
0323 xmlCharEncoding enc);
0324 XMLPUBFUN int
0325 xmlSwitchEncodingName (xmlParserCtxtPtr ctxt,
0326 const char *encoding);
0327 XMLPUBFUN int
0328 xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
0329 xmlCharEncodingHandlerPtr handler);
0330 XML_DEPRECATED
0331 XMLPUBFUN int
0332 xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt,
0333 xmlParserInputPtr input,
0334 xmlCharEncodingHandlerPtr handler);
0335
0336
0337
0338
0339 XMLPUBFUN xmlParserInputPtr
0340 xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
0341 const xmlChar *buffer);
0342 XML_DEPRECATED
0343 XMLPUBFUN xmlParserInputPtr
0344 xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
0345 xmlEntityPtr entity);
0346 XMLPUBFUN int
0347 xmlPushInput (xmlParserCtxtPtr ctxt,
0348 xmlParserInputPtr input);
0349 XMLPUBFUN xmlChar
0350 xmlPopInput (xmlParserCtxtPtr ctxt);
0351 XMLPUBFUN void
0352 xmlFreeInputStream (xmlParserInputPtr input);
0353 XMLPUBFUN xmlParserInputPtr
0354 xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
0355 const char *filename);
0356 XMLPUBFUN xmlParserInputPtr
0357 xmlNewInputStream (xmlParserCtxtPtr ctxt);
0358
0359
0360
0361
0362 XMLPUBFUN xmlChar *
0363 xmlSplitQName (xmlParserCtxtPtr ctxt,
0364 const xmlChar *name,
0365 xmlChar **prefix);
0366
0367
0368
0369
0370 XML_DEPRECATED
0371 XMLPUBFUN const xmlChar *
0372 xmlParseName (xmlParserCtxtPtr ctxt);
0373 XML_DEPRECATED
0374 XMLPUBFUN xmlChar *
0375 xmlParseNmtoken (xmlParserCtxtPtr ctxt);
0376 XML_DEPRECATED
0377 XMLPUBFUN xmlChar *
0378 xmlParseEntityValue (xmlParserCtxtPtr ctxt,
0379 xmlChar **orig);
0380 XML_DEPRECATED
0381 XMLPUBFUN xmlChar *
0382 xmlParseAttValue (xmlParserCtxtPtr ctxt);
0383 XML_DEPRECATED
0384 XMLPUBFUN xmlChar *
0385 xmlParseSystemLiteral (xmlParserCtxtPtr ctxt);
0386 XML_DEPRECATED
0387 XMLPUBFUN xmlChar *
0388 xmlParsePubidLiteral (xmlParserCtxtPtr ctxt);
0389 XML_DEPRECATED
0390 XMLPUBFUN void
0391 xmlParseCharData (xmlParserCtxtPtr ctxt,
0392 int cdata);
0393 XML_DEPRECATED
0394 XMLPUBFUN xmlChar *
0395 xmlParseExternalID (xmlParserCtxtPtr ctxt,
0396 xmlChar **publicID,
0397 int strict);
0398 XML_DEPRECATED
0399 XMLPUBFUN void
0400 xmlParseComment (xmlParserCtxtPtr ctxt);
0401 XML_DEPRECATED
0402 XMLPUBFUN const xmlChar *
0403 xmlParsePITarget (xmlParserCtxtPtr ctxt);
0404 XML_DEPRECATED
0405 XMLPUBFUN void
0406 xmlParsePI (xmlParserCtxtPtr ctxt);
0407 XML_DEPRECATED
0408 XMLPUBFUN void
0409 xmlParseNotationDecl (xmlParserCtxtPtr ctxt);
0410 XML_DEPRECATED
0411 XMLPUBFUN void
0412 xmlParseEntityDecl (xmlParserCtxtPtr ctxt);
0413 XML_DEPRECATED
0414 XMLPUBFUN int
0415 xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
0416 xmlChar **value);
0417 XML_DEPRECATED
0418 XMLPUBFUN xmlEnumerationPtr
0419 xmlParseNotationType (xmlParserCtxtPtr ctxt);
0420 XML_DEPRECATED
0421 XMLPUBFUN xmlEnumerationPtr
0422 xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
0423 XML_DEPRECATED
0424 XMLPUBFUN int
0425 xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
0426 xmlEnumerationPtr *tree);
0427 XML_DEPRECATED
0428 XMLPUBFUN int
0429 xmlParseAttributeType (xmlParserCtxtPtr ctxt,
0430 xmlEnumerationPtr *tree);
0431 XML_DEPRECATED
0432 XMLPUBFUN void
0433 xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
0434 XML_DEPRECATED
0435 XMLPUBFUN xmlElementContentPtr
0436 xmlParseElementMixedContentDecl
0437 (xmlParserCtxtPtr ctxt,
0438 int inputchk);
0439 XML_DEPRECATED
0440 XMLPUBFUN xmlElementContentPtr
0441 xmlParseElementChildrenContentDecl
0442 (xmlParserCtxtPtr ctxt,
0443 int inputchk);
0444 XML_DEPRECATED
0445 XMLPUBFUN int
0446 xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
0447 const xmlChar *name,
0448 xmlElementContentPtr *result);
0449 XML_DEPRECATED
0450 XMLPUBFUN int
0451 xmlParseElementDecl (xmlParserCtxtPtr ctxt);
0452 XML_DEPRECATED
0453 XMLPUBFUN void
0454 xmlParseMarkupDecl (xmlParserCtxtPtr ctxt);
0455 XML_DEPRECATED
0456 XMLPUBFUN int
0457 xmlParseCharRef (xmlParserCtxtPtr ctxt);
0458 XML_DEPRECATED
0459 XMLPUBFUN xmlEntityPtr
0460 xmlParseEntityRef (xmlParserCtxtPtr ctxt);
0461 XML_DEPRECATED
0462 XMLPUBFUN void
0463 xmlParseReference (xmlParserCtxtPtr ctxt);
0464 XML_DEPRECATED
0465 XMLPUBFUN void
0466 xmlParsePEReference (xmlParserCtxtPtr ctxt);
0467 XML_DEPRECATED
0468 XMLPUBFUN void
0469 xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
0470 #ifdef LIBXML_SAX1_ENABLED
0471 XML_DEPRECATED
0472 XMLPUBFUN const xmlChar *
0473 xmlParseAttribute (xmlParserCtxtPtr ctxt,
0474 xmlChar **value);
0475 XML_DEPRECATED
0476 XMLPUBFUN const xmlChar *
0477 xmlParseStartTag (xmlParserCtxtPtr ctxt);
0478 XML_DEPRECATED
0479 XMLPUBFUN void
0480 xmlParseEndTag (xmlParserCtxtPtr ctxt);
0481 #endif
0482 XML_DEPRECATED
0483 XMLPUBFUN void
0484 xmlParseCDSect (xmlParserCtxtPtr ctxt);
0485 XMLPUBFUN void
0486 xmlParseContent (xmlParserCtxtPtr ctxt);
0487 XML_DEPRECATED
0488 XMLPUBFUN void
0489 xmlParseElement (xmlParserCtxtPtr ctxt);
0490 XML_DEPRECATED
0491 XMLPUBFUN xmlChar *
0492 xmlParseVersionNum (xmlParserCtxtPtr ctxt);
0493 XML_DEPRECATED
0494 XMLPUBFUN xmlChar *
0495 xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
0496 XML_DEPRECATED
0497 XMLPUBFUN xmlChar *
0498 xmlParseEncName (xmlParserCtxtPtr ctxt);
0499 XML_DEPRECATED
0500 XMLPUBFUN const xmlChar *
0501 xmlParseEncodingDecl (xmlParserCtxtPtr ctxt);
0502 XML_DEPRECATED
0503 XMLPUBFUN int
0504 xmlParseSDDecl (xmlParserCtxtPtr ctxt);
0505 XML_DEPRECATED
0506 XMLPUBFUN void
0507 xmlParseXMLDecl (xmlParserCtxtPtr ctxt);
0508 XML_DEPRECATED
0509 XMLPUBFUN void
0510 xmlParseTextDecl (xmlParserCtxtPtr ctxt);
0511 XML_DEPRECATED
0512 XMLPUBFUN void
0513 xmlParseMisc (xmlParserCtxtPtr ctxt);
0514 XMLPUBFUN void
0515 xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
0516 const xmlChar *ExternalID,
0517 const xmlChar *SystemID);
0518
0519
0520
0521
0522
0523 #define XML_SUBSTITUTE_NONE 0
0524
0525
0526
0527
0528
0529 #define XML_SUBSTITUTE_REF 1
0530
0531
0532
0533
0534
0535 #define XML_SUBSTITUTE_PEREF 2
0536
0537
0538
0539
0540
0541 #define XML_SUBSTITUTE_BOTH 3
0542
0543 XML_DEPRECATED
0544 XMLPUBFUN xmlChar *
0545 xmlStringDecodeEntities (xmlParserCtxtPtr ctxt,
0546 const xmlChar *str,
0547 int what,
0548 xmlChar end,
0549 xmlChar end2,
0550 xmlChar end3);
0551 XML_DEPRECATED
0552 XMLPUBFUN xmlChar *
0553 xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt,
0554 const xmlChar *str,
0555 int len,
0556 int what,
0557 xmlChar end,
0558 xmlChar end2,
0559 xmlChar end3);
0560
0561
0562
0563
0564 XML_DEPRECATED
0565 XMLPUBFUN int nodePush (xmlParserCtxtPtr ctxt,
0566 xmlNodePtr value);
0567 XML_DEPRECATED
0568 XMLPUBFUN xmlNodePtr nodePop (xmlParserCtxtPtr ctxt);
0569 XMLPUBFUN int inputPush (xmlParserCtxtPtr ctxt,
0570 xmlParserInputPtr value);
0571 XMLPUBFUN xmlParserInputPtr inputPop (xmlParserCtxtPtr ctxt);
0572 XML_DEPRECATED
0573 XMLPUBFUN const xmlChar * namePop (xmlParserCtxtPtr ctxt);
0574 XML_DEPRECATED
0575 XMLPUBFUN int namePush (xmlParserCtxtPtr ctxt,
0576 const xmlChar *value);
0577
0578
0579
0580
0581 XML_DEPRECATED
0582 XMLPUBFUN int xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
0583 XML_DEPRECATED
0584 XMLPUBFUN int xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
0585 const xmlChar *cur,
0586 int *len);
0587 XML_DEPRECATED
0588 XMLPUBFUN void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
0589 XML_DEPRECATED
0590 XMLPUBFUN int xmlCheckLanguageID (const xmlChar *lang);
0591
0592
0593
0594
0595 XML_DEPRECATED
0596 XMLPUBFUN int xmlCurrentChar (xmlParserCtxtPtr ctxt,
0597 int *len);
0598 XMLPUBFUN int xmlCopyCharMultiByte (xmlChar *out,
0599 int val);
0600 XMLPUBFUN int xmlCopyChar (int len,
0601 xmlChar *out,
0602 int val);
0603 XML_DEPRECATED
0604 XMLPUBFUN void xmlNextChar (xmlParserCtxtPtr ctxt);
0605 XML_DEPRECATED
0606 XMLPUBFUN void xmlParserInputShrink (xmlParserInputPtr in);
0607
0608
0609
0610
0611
0612 #ifdef LIBXML_LEGACY_ENABLED
0613
0614
0615
0616
0617
0618
0619
0620
0621
0622 typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
0623 xmlNodePtr firstNode,
0624 xmlNodePtr lastNode);
0625
0626 XML_DEPRECATED
0627 XMLPUBFUN void xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
0628
0629 XML_DEPRECATED
0630 XMLPUBFUN xmlChar *
0631 xmlParseQuotedString (xmlParserCtxtPtr ctxt);
0632 XML_DEPRECATED
0633 XMLPUBFUN void
0634 xmlParseNamespace (xmlParserCtxtPtr ctxt);
0635 XML_DEPRECATED
0636 XMLPUBFUN xmlChar *
0637 xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
0638 XML_DEPRECATED
0639 XMLPUBFUN xmlChar *
0640 xmlScanName (xmlParserCtxtPtr ctxt);
0641 XML_DEPRECATED
0642 XMLPUBFUN xmlChar *
0643 xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
0644 XML_DEPRECATED
0645 XMLPUBFUN void xmlParserHandleReference(xmlParserCtxtPtr ctxt);
0646 XML_DEPRECATED
0647 XMLPUBFUN xmlChar *
0648 xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
0649 xmlChar **prefix);
0650
0651
0652
0653 XML_DEPRECATED
0654 XMLPUBFUN xmlChar *
0655 xmlDecodeEntities (xmlParserCtxtPtr ctxt,
0656 int len,
0657 int what,
0658 xmlChar end,
0659 xmlChar end2,
0660 xmlChar end3);
0661 XML_DEPRECATED
0662 XMLPUBFUN void
0663 xmlHandleEntity (xmlParserCtxtPtr ctxt,
0664 xmlEntityPtr entity);
0665
0666 #endif
0667
0668 #ifdef __cplusplus
0669 }
0670 #endif
0671 #endif