package SZXX
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module Xml.SAXSource
Advanced parsing utilities: custom parser options and tools to stream huge documents
type node = | Prologue of DOM.attr_list| Element_open of {tag : Base.string;attrs : DOM.attr_list;
}| Element_close of Base.string| Text of Base.string| Cdata of Base.string| Nothing| Many of node Base.list
type parser_options = {accept_html_boolean_attributes : Base.bool;(*Invalid XML but valid HTML:
*)<div attr1="foo" attr2>But withaccept_html_boolean_attributesset totrue,attr2will be"attr2"accept_unquoted_attributes : Base.bool;(*Invalid XML but valid HTML:
*)<div attr1="foo" attr2=bar>But withaccept_unquoted_attributesset totrue,attr2will be"bar"accept_single_quoted_attributes : Base.bool;(*Invalid XML but valid HTML:
*)<div attr1="foo" attr2='bar'>But withaccept_unquoted_attributesset totrue,attr2will be"bar"batch_size : Base.int;(*(Default:
*)20) Performance optimization. Whenbatch_sizeis greater than 1, the parser will prefer to returnMany listwhere the length oflistisbatch_size.
}HTML boolean attributes: true. Anything else: false.
IO-agnostic Angstrom.t XML parser.
It is not fully spec-compliant, it does not attempt to validate character encoding or reject all incorrect documents. It does not process references. It does not automatically unescape XML escape sequences but SZXX.Xml.DOM.unescape is provided to do so.
See README.md for examples on how to use it.