`sig
type expat_parser
val parser_create : encoding:string option -> Expat.expat_parser
val parser_create_ns :
encoding:string option -> separator:char -> Expat.expat_parser
val external_entity_parser_create :
Expat.expat_parser ->
string option -> string option -> Expat.expat_parser
val parse : Expat.expat_parser -> string -> unit
val parse_bytes : Expat.expat_parser -> bytes -> unit
val parse_sub : Expat.expat_parser -> string -> int -> int -> unit
val parse_sub_bytes : Expat.expat_parser -> bytes -> int -> int -> unit
val final : Expat.expat_parser -> unit
val set_start_element_handler :
Expat.expat_parser -> (string -> (string * string) list -> unit) -> unit
val reset_start_element_handler : Expat.expat_parser -> unit
val set_end_element_handler :
Expat.expat_parser -> (string -> unit) -> unit
val reset_end_element_handler : Expat.expat_parser -> unit
val set_character_data_handler :
Expat.expat_parser -> (string -> unit) -> unit
val reset_character_data_handler : Expat.expat_parser -> unit
val set_processing_instruction_handler :
Expat.expat_parser -> (string -> string -> unit) -> unit
val reset_processing_instruction_handler : Expat.expat_parser -> unit
val set_comment_handler : Expat.expat_parser -> (string -> unit) -> unit
val reset_comment_handler : Expat.expat_parser -> unit
val set_start_cdata_handler : Expat.expat_parser -> (unit -> unit) -> unit
val reset_start_cdata_handler : Expat.expat_parser -> unit
val set_end_cdata_handler : Expat.expat_parser -> (unit -> unit) -> unit
val reset_end_cdata_handler : Expat.expat_parser -> unit
val set_default_handler : Expat.expat_parser -> (string -> unit) -> unit
val reset_default_handler : Expat.expat_parser -> unit
val set_external_entity_ref_handler :
Expat.expat_parser ->
(string option -> string option -> string -> string option -> unit) ->
unit
val reset_external_entity_ref_handler : Expat.expat_parser -> unit
val get_current_byte_index : Expat.expat_parser -> int
val get_current_column_number : Expat.expat_parser -> int
val get_current_line_number : Expat.expat_parser -> int
val get_current_byte_count : Expat.expat_parser -> int
type xml_error =
NONE
| NO_MEMORY
| SYNTAX
| NO_ELEMENTS
| INVALID_TOKEN
| UNCLOSED_TOKEN
| PARTIAL_CHAR
| TAG_MISMATCH
| DUPLICATE_ATTRIBUTE
| JUNK_AFTER_DOC_ELEMENT
| PARAM_ENTITY_REF
| UNDEFINED_ENTITY
| RECURSIVE_ENTITY_REF
| ASYNC_ENTITY
| BAD_CHAR_REF
| BINARY_ENTITY_REF
| ATTRIBUTE_EXTERNAL_ENTITY_REF
| MISPLACED_XML_PI
| UNKNOWN_ENCODING
| INCORRECT_ENCODING
| UNCLOSED_CDATA_SECTION
| EXTERNAL_ENTITY_HANDLING
| NOT_STANDALONE
| UNEXPECTED_STATE
| ENTITY_DECLARED_IN_PE
| FEATURE_REQUIRES_XML_DTD
| CANT_CHANGE_FEATURE_ONCE_PARSING
exception Expat_error of Expat.xml_error
val xml_error_to_string : Expat.xml_error -> string
val set_base : Expat.expat_parser -> string option -> unit
val get_base : Expat.expat_parser -> string option
type xml_param_entity_parsing_choice = NEVER | UNLESS_STANDALONE | ALWAYS
val set_param_entity_parsing :
Expat.expat_parser -> Expat.xml_param_entity_parsing_choice -> bool
val expat_version : unit -> string
end`