src/Pure/General/xml.ML
author aspinall
Sun, 03 Dec 2006 16:25:33 +0100
changeset 21628 7ab9ad8d6757
parent 19482 9f11af8f7ef9
child 21629 c762bdc2b504
permissions -rw-r--r--
Type abbreviations for element args and attributes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12416
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
     1
(*  Title:      Pure/General/xml.ML
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
     2
    ID:         $Id$
14728
wenzelm
parents: 14714
diff changeset
     3
    Author:     David Aspinall, Stefan Berghofer and Markus Wenzel
12416
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
     4
14969
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
     5
Basic support for XML.
12416
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
     6
*)
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
     7
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
     8
signature XML =
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
     9
sig
21628
7ab9ad8d6757 Type abbreviations for element args and attributes
aspinall
parents: 19482
diff changeset
    10
  type attributes = (string * string) list
7ab9ad8d6757 Type abbreviations for element args and attributes
aspinall
parents: 19482
diff changeset
    11
  datatype tree =
7ab9ad8d6757 Type abbreviations for element args and attributes
aspinall
parents: 19482
diff changeset
    12
      Elem of string * attributes * tree list
7ab9ad8d6757 Type abbreviations for element args and attributes
aspinall
parents: 19482
diff changeset
    13
    | Text of string
7ab9ad8d6757 Type abbreviations for element args and attributes
aspinall
parents: 19482
diff changeset
    14
  type element = string * attributes * tree list
14969
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    15
  val header: string
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    16
  val text: string -> string
15211
5f54721547a7 Add text_charref to encode a string using character references
aspinall
parents: 15207
diff changeset
    17
  val text_charref: string -> string
14969
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    18
  val cdata: string -> string
21628
7ab9ad8d6757 Type abbreviations for element args and attributes
aspinall
parents: 19482
diff changeset
    19
  val element: string -> attributes -> string list -> string
13729
1a8dda49fd86 Added XML parser (useful for parsing PGIP / PGML).
berghofe
parents: 12416
diff changeset
    20
  val string_of_tree: tree -> string
14185
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
    21
  val parse_content: string list -> tree list * string list
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
    22
  val parse_elem: string list -> tree * string list
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
    23
  val parse_document: string list -> (string option * tree) * string list
15142
7b7109f22224 Add scan_comment_whspc to skip space and comments in PGIP stream
aspinall
parents: 15010
diff changeset
    24
  val scan_comment_whspc : string list -> unit * string list
14969
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    25
  val tree_of_string: string -> tree
12416
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    26
end;
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    27
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    28
structure XML: XML =
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    29
struct
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    30
14969
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    31
(** string based representation (small scale) **)
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    32
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    33
val header = "<?xml version=\"1.0\"?>\n";
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    34
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    35
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    36
(* text and character data *)
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    37
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    38
fun decode "&lt;" = "<"
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    39
  | decode "&gt;" = ">"
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    40
  | decode "&amp;" = "&"
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    41
  | decode "&apos;" = "'"
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    42
  | decode "&quot;" = "\""
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    43
  | decode c = c;
12416
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    44
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    45
fun encode "<" = "&lt;"
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    46
  | encode ">" = "&gt;"
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    47
  | encode "&" = "&amp;"
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    48
  | encode "'" = "&apos;"
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    49
  | encode "\"" = "&quot;"
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    50
  | encode c = c;
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    51
17756
d4a35f82fbb4 minor tweaks for Poplog/ML;
wenzelm
parents: 15570
diff changeset
    52
fun encode_charref c = "&#" ^ Int.toString (ord c) ^ ";"
15211
5f54721547a7 Add text_charref to encode a string using character references
aspinall
parents: 15207
diff changeset
    53
5f54721547a7 Add text_charref to encode a string using character references
aspinall
parents: 15207
diff changeset
    54
val text = Library.translate_string encode
5f54721547a7 Add text_charref to encode a string using character references
aspinall
parents: 15207
diff changeset
    55
17756
d4a35f82fbb4 minor tweaks for Poplog/ML;
wenzelm
parents: 15570
diff changeset
    56
val text_charref = translate_string encode_charref;
12416
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    57
15207
a383b0a412b0 Add newline after CDATA for sake of HaXml
aspinall
parents: 15142
diff changeset
    58
val cdata = enclose "<![CDATA[" "]]>\n"
12416
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    59
14728
wenzelm
parents: 14714
diff changeset
    60
12416
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    61
(* elements *)
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    62
14728
wenzelm
parents: 14714
diff changeset
    63
fun attribute (a, x) = a ^ " = \"" ^ text x ^ "\"";
12416
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    64
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    65
fun element name atts cs =
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    66
  let val elem = space_implode " " (name :: map attribute atts) in
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    67
    if null cs then enclose "<" "/>" elem
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    68
    else enclose "<" ">" elem ^ implode cs ^ enclose "</" ">" name
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    69
  end;
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    70
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
    71
13729
1a8dda49fd86 Added XML parser (useful for parsing PGIP / PGML).
berghofe
parents: 12416
diff changeset
    72
15207
a383b0a412b0 Add newline after CDATA for sake of HaXml
aspinall
parents: 15142
diff changeset
    73
14969
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    74
(** explicit XML trees **)
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    75
21628
7ab9ad8d6757 Type abbreviations for element args and attributes
aspinall
parents: 19482
diff changeset
    76
type attributes = (string * string) list
7ab9ad8d6757 Type abbreviations for element args and attributes
aspinall
parents: 19482
diff changeset
    77
14969
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    78
datatype tree =
21628
7ab9ad8d6757 Type abbreviations for element args and attributes
aspinall
parents: 19482
diff changeset
    79
    Elem of string * attributes * tree list
14969
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    80
  | Text of string;
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    81
21628
7ab9ad8d6757 Type abbreviations for element args and attributes
aspinall
parents: 19482
diff changeset
    82
type element = string * attributes * tree list
7ab9ad8d6757 Type abbreviations for element args and attributes
aspinall
parents: 19482
diff changeset
    83
14969
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    84
fun string_of_tree tree =
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    85
  let
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    86
    fun string_of (Elem (name, atts, ts)) buf =
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    87
        let val buf' =
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    88
          buf |> Buffer.add "<"
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    89
          |> fold Buffer.add (separate " " (name :: map attribute atts))
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    90
        in
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    91
          if null ts then
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    92
            buf' |> Buffer.add "/>"
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    93
          else
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    94
            buf' |> Buffer.add ">"
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    95
            |> fold string_of ts
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    96
            |> Buffer.add "</" |> Buffer.add name |> Buffer.add ">"
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    97
        end
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    98
      | string_of (Text s) buf = Buffer.add (text s) buf;
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
    99
  in Buffer.content (string_of tree Buffer.empty) end;
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
   100
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
   101
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
   102
3d9126cbf0e6 scalable string_of_tree; tuned;
wenzelm
parents: 14928
diff changeset
   103
(** XML parsing **)
13729
1a8dda49fd86 Added XML parser (useful for parsing PGIP / PGML).
berghofe
parents: 12416
diff changeset
   104
14728
wenzelm
parents: 14714
diff changeset
   105
fun err s (xs, _) =
wenzelm
parents: 14714
diff changeset
   106
  "XML parsing error: " ^ s ^ "\nfound: " ^ quote (Symbol.beginning 100 xs);
13729
1a8dda49fd86 Added XML parser (useful for parsing PGIP / PGML).
berghofe
parents: 12416
diff changeset
   107
14728
wenzelm
parents: 14714
diff changeset
   108
val scan_whspc = Scan.any Symbol.is_blank;
13729
1a8dda49fd86 Added XML parser (useful for parsing PGIP / PGML).
berghofe
parents: 12416
diff changeset
   109
1a8dda49fd86 Added XML parser (useful for parsing PGIP / PGML).
berghofe
parents: 12416
diff changeset
   110
val scan_special = $$ "&" ^^ Symbol.scan_id ^^ $$ ";" >> decode;
1a8dda49fd86 Added XML parser (useful for parsing PGIP / PGML).
berghofe
parents: 12416
diff changeset
   111
15216
2fac1f11b7f6 Remove white space skipping in element content; XML specification clearly requires whitespace to be passed to application.
aspinall
parents: 15211
diff changeset
   112
val parse_chars = Scan.repeat1 (Scan.unless ((* scan_whspc -- *)$$ "<")
14185
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   113
  (scan_special || Scan.one Symbol.not_eof)) >> implode;
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   114
14910
f145696d4bb5 Scan.this_string;
wenzelm
parents: 14865
diff changeset
   115
val parse_cdata = Scan.this_string "<![CDATA[" |--
f145696d4bb5 Scan.this_string;
wenzelm
parents: 14865
diff changeset
   116
  (Scan.repeat (Scan.unless (Scan.this_string "]]>") (Scan.one Symbol.not_eof)) >>
f145696d4bb5 Scan.this_string;
wenzelm
parents: 14865
diff changeset
   117
    implode) --| Scan.this_string "]]>";
14185
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   118
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   119
val parse_att =
14865
8b9a372b3e90 Tuned parse_att.
berghofe
parents: 14863
diff changeset
   120
  Symbol.scan_id --| scan_whspc --| $$ "=" --| scan_whspc --
8b9a372b3e90 Tuned parse_att.
berghofe
parents: 14863
diff changeset
   121
  (($$ "\"" || $$ "'") :-- (fn s => (Scan.repeat (Scan.unless ($$ s)
8b9a372b3e90 Tuned parse_att.
berghofe
parents: 14863
diff changeset
   122
    (scan_special || Scan.one Symbol.not_eof)) >> implode) --| $$ s) >> snd);
14863
49afb368f4be Add alternative syntax for attributes
aspinall
parents: 14844
diff changeset
   123
14910
f145696d4bb5 Scan.this_string;
wenzelm
parents: 14865
diff changeset
   124
val parse_comment = Scan.this_string "<!--" --
f145696d4bb5 Scan.this_string;
wenzelm
parents: 14865
diff changeset
   125
  Scan.repeat (Scan.unless (Scan.this_string "-->") (Scan.one Symbol.not_eof)) --
f145696d4bb5 Scan.this_string;
wenzelm
parents: 14865
diff changeset
   126
  Scan.this_string "-->";
13729
1a8dda49fd86 Added XML parser (useful for parsing PGIP / PGML).
berghofe
parents: 12416
diff changeset
   127
15142
7b7109f22224 Add scan_comment_whspc to skip space and comments in PGIP stream
aspinall
parents: 15010
diff changeset
   128
val scan_comment_whspc = 
7b7109f22224 Add scan_comment_whspc to skip space and comments in PGIP stream
aspinall
parents: 15010
diff changeset
   129
    (scan_whspc >> K()) --| (Scan.repeat (parse_comment |-- (scan_whspc >> K())));
7b7109f22224 Add scan_comment_whspc to skip space and comments in PGIP stream
aspinall
parents: 15010
diff changeset
   130
14910
f145696d4bb5 Scan.this_string;
wenzelm
parents: 14865
diff changeset
   131
val parse_pi = Scan.this_string "<?" |--
f145696d4bb5 Scan.this_string;
wenzelm
parents: 14865
diff changeset
   132
  Scan.repeat (Scan.unless (Scan.this_string "?>") (Scan.one Symbol.not_eof)) --|
f145696d4bb5 Scan.this_string;
wenzelm
parents: 14865
diff changeset
   133
  Scan.this_string "?>";
13729
1a8dda49fd86 Added XML parser (useful for parsing PGIP / PGML).
berghofe
parents: 12416
diff changeset
   134
14185
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   135
fun parse_content xs =
15216
2fac1f11b7f6 Remove white space skipping in element content; XML specification clearly requires whitespace to be passed to application.
aspinall
parents: 15211
diff changeset
   136
  ((Scan.optional ((* scan_whspc |-- *) parse_chars >> (single o Text)) [] --
2fac1f11b7f6 Remove white space skipping in element content; XML specification clearly requires whitespace to be passed to application.
aspinall
parents: 15211
diff changeset
   137
    (Scan.repeat ((* scan_whspc |-- *)
14185
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   138
       (   parse_elem >> single
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   139
        || parse_cdata >> (single o Text)
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   140
        || parse_pi >> K []
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   141
        || parse_comment >> K []) --
15216
2fac1f11b7f6 Remove white space skipping in element content; XML specification clearly requires whitespace to be passed to application.
aspinall
parents: 15211
diff changeset
   142
       Scan.optional ((* scan_whspc |-- *) parse_chars >> (single o Text)) []
19482
9f11af8f7ef9 tuned basic list operators (flat, maps, map_filter);
wenzelm
parents: 17756
diff changeset
   143
         >> op @) >> flat) >> op @)(* --| scan_whspc*)) xs
14185
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   144
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   145
and parse_elem xs =
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   146
  ($$ "<" |-- Symbol.scan_id --
14865
8b9a372b3e90 Tuned parse_att.
berghofe
parents: 14863
diff changeset
   147
    Scan.repeat (scan_whspc |-- parse_att) --| scan_whspc :-- (fn (s, _) =>
14185
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   148
      !! (err "Expected > or />")
14910
f145696d4bb5 Scan.this_string;
wenzelm
parents: 14865
diff changeset
   149
        (Scan.this_string "/>" >> K []
14185
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   150
         || $$ ">" |-- parse_content --|
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   151
            !! (err ("Expected </" ^ s ^ ">"))
14910
f145696d4bb5 Scan.this_string;
wenzelm
parents: 14865
diff changeset
   152
              (Scan.this_string ("</" ^ s) --| scan_whspc --| $$ ">"))) >>
13729
1a8dda49fd86 Added XML parser (useful for parsing PGIP / PGML).
berghofe
parents: 12416
diff changeset
   153
    (fn ((s, atts), ts) => Elem (s, atts, ts))) xs;
1a8dda49fd86 Added XML parser (useful for parsing PGIP / PGML).
berghofe
parents: 12416
diff changeset
   154
14185
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   155
val parse_document =
14910
f145696d4bb5 Scan.this_string;
wenzelm
parents: 14865
diff changeset
   156
  Scan.option (Scan.this_string "<!DOCTYPE" -- scan_whspc |--
14185
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   157
    (Scan.repeat (Scan.unless ($$ ">")
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   158
      (Scan.one Symbol.not_eof)) >> implode) --| $$ ">" --| scan_whspc) --
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   159
  parse_elem;
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   160
13729
1a8dda49fd86 Added XML parser (useful for parsing PGIP / PGML).
berghofe
parents: 12416
diff changeset
   161
fun tree_of_string s =
14185
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   162
  (case Scan.finite Symbol.stopper (Scan.error (!! (err "Malformed element")
9b3841638c06 Tried to make parser a bit more standard-conforming.
berghofe
parents: 13729
diff changeset
   163
      (scan_whspc |-- parse_elem --| scan_whspc))) (Symbol.explode s) of
14728
wenzelm
parents: 14714
diff changeset
   164
    (x, []) => x
wenzelm
parents: 14714
diff changeset
   165
  | (_, ys) => error ("XML parsing error: Unprocessed input\n" ^ Symbol.beginning 100 ys));
13729
1a8dda49fd86 Added XML parser (useful for parsing PGIP / PGML).
berghofe
parents: 12416
diff changeset
   166
12416
9b3e7a35da30 Basic support for XML output.
wenzelm
parents:
diff changeset
   167
end;