xml.mli 1.26 KB
Newer Older
1 2 3
(********************************************************************)
(*                                                                  *)
(*  The Why3 Verification Platform   /   The Why3 Development Team  *)
4
(*  Copyright 2010-2015   --   INRIA - CNRS - Paris-Sud University  *)
5 6 7 8
(*                                                                  *)
(*  This software is distributed under the terms of the GNU Lesser  *)
(*  General Public License version 2.1, with the special exception  *)
(*  on linking described in file LICENSE.                           *)
9
(*                                                                  *)
10
(********************************************************************)
MARCHE Claude's avatar
MARCHE Claude committed
11

12
type attributes = (string * string) list
MARCHE Claude's avatar
MARCHE Claude committed
13 14 15

type element =
    { name : string;
16
      attributes : attributes;
MARCHE Claude's avatar
MARCHE Claude committed
17 18 19
      elements : element list;
    }

MARCHE Claude's avatar
MARCHE Claude committed
20 21 22 23 24 25 26 27 28
type t =
    { version : string;
      encoding : string;
      doctype : string;
      dtd : string;
      content : element;
    }

exception Parse_error of string
MARCHE Claude's avatar
MARCHE Claude committed
29

30 31
val from_file : 
  ?fixattrs:(string -> attributes -> attributes) -> string -> t
MARCHE Claude's avatar
MARCHE Claude committed
32 33 34 35
  (** returns the list of XML elements from the given file.
      raise [Sys_error] if the file cannot be opened.
      raise [Parse_error] if the file does not follow XML syntax
  *)
MARCHE Claude's avatar
MARCHE Claude committed
36