coq
Formal proof management system
1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
back to documentation root
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Library coqide-server.protocol
type xml = Xml_datatype.xml
An Xml node is either Element (tag-name, attributes, children)
or PCData text
Xml Exceptions
Several exceptions can be raised when parsing an Xml document :
Xml
.Error is raised when an xml parsing error occurs. theXml
.error_msg tells you which error occurred during parsing and theXml
.error_pos can be used to retrieve the document location where the error occurred at.Xml
.File_not_found is raised when an error occurred while opening a file with theXml
.parse_file function.
exception Error of error
val error : error -> string
Get a full error message from an Xml error.
val error_msg : error_msg -> string
Get the Xml error message as a string.
val line : error_pos -> int
Get the line the error occurred at.
val range : error_pos -> int * int
Get the relative character range (in current line) the error occurred at.
val abs_range : error_pos -> int * int
Get the absolute character range the error occurred at.
val pos : Lexing.lexbuf -> error_pos
Several kind of resources can contain Xml documents.
val check_eof : t -> bool -> unit
When a Xml document is parsed, the parser may check that the end of the document is reached, so for example parsing "<A/><B/>"
will fail instead of returning only the A element. You can turn on this check by setting check_eof
to true
(by default, check_eof is false, unlike in the original Xmllight).