/[svn]/runtime/print_xml.ml
ViewVC logotype

Diff of /runtime/print_xml.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 77 by abate, Tue Jul 10 17:04:10 2007 UTC revision 78 by abate, Tue Jul 10 17:04:23 2007 UTC
# Line 4  Line 4 
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    
# Line 38  Line 39 
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 ->

Legend:
Removed from v.77  
changed lines
  Added in v.78

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5