| 4 |
open Pxp_types |
open Pxp_types |
| 5 |
open Value |
open Value |
| 6 |
|
|
| 7 |
let exn_print_xml = CDuceExn (Pair (Atom (Types.mk_atom "Invalid_argument"), |
let exn_print_xml = CDuceExn (Pair ( |
| 8 |
|
Atom (Types.AtomPool.mk "Invalid_argument"), |
| 9 |
string "print_xml")) |
string "print_xml")) |
| 10 |
|
|
| 11 |
|
|
| 39 |
|
|
| 40 |
let rec print_elt = function |
let rec print_elt = function |
| 41 |
| Pair (Atom tag, Pair (Record attrs, content)) -> |
| Pair (Atom tag, Pair (Record attrs, content)) -> |
| 42 |
let tag = Types.atom_name tag in |
let tag = Types.AtomPool.value tag in |
| 43 |
element_start tag |
element_start tag |
| 44 |
(List.map (fun (n,v) -> |
(List.map (fun (n,v) -> |
| 45 |
if not (is_str v) then raise exn_print_xml; |
if not (is_str v) then raise exn_print_xml; |
| 46 |
(Types.label_name n,get_string v)) attrs); |
(Types.LabelPool.value n,get_string v)) attrs); |
| 47 |
print_content content; |
print_content content; |
| 48 |
element_end tag |
element_end tag |
| 49 |
| Char x -> |
| Char x -> |