module XmlParser:Xml Light Parsersig..end
While basic parsing functions can be used in the Xml module, this module
is providing a way to create, configure and run an Xml parser.
type t
type source =
| |
SFile of |
| |
SChannel of |
| |
SString of |
| |
SLexbuf of |
val make : unit -> tval prove : t -> bool -> unitDtd module
(by default, prove is true).val resolve : t -> (string -> Dtd.checked) -> unitXml.parse_file
function, the DTD file if declared by the Xml document has to be in the
same directory as the xml file. When using other parsing functions,
such as on a string or on a channel, the parser will raise everytime
Xml.File_not_found if a DTD file is needed and prove enabled. To enable
the DTD loading of the file, the user have to configure the Xml parser
with a resolve function which is taking as argument the DTD filename and
is returning a checked DTD. The user can then implement any kind of DTD
loading strategy, and can use the Dtd module functions to parse and check
the DTD file (by default, the resolve function is raising
Xml.File_not_found).val check_eof : t -> bool -> unit"<A/><B/>" will fail instead
of returning only the A element. You can turn off this check by setting
check_eof to false (by default, check_eof is true).val parse : t -> source -> Xml.xmlval concat_pcdata : t -> bool -> unit