X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Ftree.mli;h=c75fd269c87107d8dfbee7151b914845367a2acb;hb=f608b765e000a540be707b35966eaea90ced268c;hp=1d5d77ba1176c174f6d2a6bc54f4c3cabf71739a;hpb=cba2938d929fd5119b1491686ddc224d5af618c6;p=tatoo.git diff --git a/src/tree.mli b/src/tree.mli index 1d5d77b..c75fd26 100644 --- a/src/tree.mli +++ b/src/tree.mli @@ -61,6 +61,9 @@ val parent : t -> node -> node Returns [nil] if [n == nil]. *) +val is_leaf : t -> node -> bool +(** Return true if the node is a *) + val tag : t -> node -> QName.t (** Returns the label of a given node *) @@ -74,3 +77,7 @@ val preorder : t -> node -> int (** Returns the position of a node in pre-order in the tree. The root has preorder 0. [nil] has pre-order [-1]. *) + +val print_xml_preorder : out_channel -> t -> node -> unit +(** Outputs the tree with IDs for nodes as an XML document on the + given output_channel *)