(***********************************************************************)
(*
- Time-stamp: <Last modified on 2013-03-04 23:40:26 CET by Kim Nguyen>
+ Time-stamp: <Last modified on 2013-03-05 16:20:32 CET by Kim Nguyen>
*)
open Utils
"NODE " ^ string_of_int n.preorder)
let debug_node fmt node =
- Format.fprintf fmt "{ tag=%s; preorder=%i; data=%s; first_child=%a; next_sibling=%a; parent=%a }"
+ Format.fprintf fmt "{ tag=%s; preorder=%i; data=%S; first_child=%a; next_sibling=%a; parent=%a }"
(QName.to_string node.tag)
node.preorder
node.data
in
print_xml out tree_ node.next_sibling
-
+let print_xml out tree_ node = print_xml out tree_ { node with next_sibling = nil }
let root t = t.root
let first_child _ n = n.first_child
let next_sibling _ n = n.next_sibling
let tag _ n = n.tag
let data _ n = n.data
let preorder _ n = n.preorder
+
+let print_node fmt n = Parser.debug_node fmt n