- XML_FLAG_VALIDATING = 0x1,
- XML_FLAG_VERSION_1_1 = 0x2, /* XML version 1.1, otherwise 1.0 */
- XML_FLAG_HAS_EXTERNAL_SUBSET = 0x4, /* The document contains a reference to external DTD subset */
- XML_FLAG_HAS_INTERNAL_SUBSET = 0x8, /* The document contains an internal subset */
-
- XML_FLAG_SRC_EOF = 0x10, /* EOF reached */
- XML_FLAG_SRC_EXPECTED_DECL = 0x20, /* Just before optional or required XMLDecl/TextDecl */
- XML_FLAG_SRC_NEW_LINE = 0x40, /* The last read character is 0xD */
- XML_FLAG_SRC_SURROUND = 0x80, /* Surround the text with 0x20 (references to parameter entities) */
- XML_FLAG_SRC_DOCUMENT = 0x100, /* The document entity */
- XML_FLAG_SRC_EXTERNAL = 0x200, /* An external entity */
-
- XML_DOM_SKIP = 0x1000, /* Do not report DOM nodes */
- XML_DOM_FREE = 0x2000, /* Free the subtree when leaving */
- XML_DOM_IGNORE = XML_DOM_SKIP | XML_DOM_FREE, /* Completely ignore the subtree */
-
- XML_FLAG_EMPTY_ELEM = 0x100000,
-};
-
-struct xml_ext_id {
- char *system_id;
- char *public_id;
+ /* Enable reporting of various events via SAX and/or PUSH interface */
+ XML_REPORT_COMMENTS = 0x00000001, /* Report comments */
+ XML_REPORT_PIS = 0x00000002, /* Report processing instructions */
+ XML_REPORT_CHARS = 0x00000004, /* Report characters */
+ XML_REPORT_TAGS = 0x00000008, /* Report element starts/ends */
+ XML_REPORT_MISC = XML_REPORT_COMMENTS | XML_REPORT_PIS,
+ XML_REPORT_ALL = XML_REPORT_MISC | XML_REPORT_CHARS | XML_REPORT_TAGS,
+
+ /* Enable construction of DOM for these types */
+ XML_ALLOC_COMMENTS = 0x00000010, /* Create comment nodes */
+ XML_ALLOC_PIS = 0x00000020, /* Create processing instruction nodes */
+ XML_ALLOC_CHARS = 0x00000040, /* Create character nodes */
+ XML_ALLOC_TAGS = 0x00000080, /* Create element nodes */
+ XML_ALLOC_MISC = XML_ALLOC_COMMENTS | XML_ALLOC_PIS,
+ XML_ALLOC_ALL = XML_ALLOC_MISC | XML_ALLOC_CHARS | XML_ALLOC_TAGS,
+
+ /* Other parameters */
+ XML_VALIDATING = 0x00000100, /* Validate everything (not fully implemented!) */
+ XML_PARSE_DTD = 0x00000200, /* Enable parsing of DTD */
+
+ /* Internals, do not change! */
+ XML_EMPTY_ELEM_TAG = 0x00010000, /* The current element match EmptyElemTag */
+ XML_VERSION_1_1 = 0x00020000, /* XML version is 1.1, otherwise 1.0 */
+ XML_HAS_EXTERNAL_SUBSET = 0x00040000, /* The document contains a reference to external DTD subset */
+ XML_HAS_INTERNAL_SUBSET = 0x00080000, /* The document contains an internal subset */
+ XML_SRC_EOF = 0x00100000, /* EOF reached */
+ XML_SRC_EXPECTED_DECL = 0x00200000, /* Just before optional or required XMLDecl/TextDecl */
+ XML_SRC_DOCUMENT = 0x00400000, /* The document entity */
+ XML_SRC_EXTERNAL = 0x00800000, /* An external entity */