+extern "C" value caml_xml_tree_builder_new_closing_tag(value vbuilder, value vtag)
+{
+ CAMLparam2(vbuilder, vtag);
+ const char * tag = String_val(vtag);
+ if (XMLTREEBUILDER(vbuilder)->NewClosingTag(std::string(tag)) == NULLT)
+ CAMLRAISEMSG("NewClosingTag");
+
+ CAMLreturn (Val_unit);
+}
+
+extern "C" value caml_xml_tree_builder_new_text(value vbuilder, value vtext)
+{
+ CAMLparam2(vbuilder, vtext);
+ const char * text = String_val(vtext);
+ if (XMLTREEBUILDER(vbuilder)->NewText(std::string(text)) == NULLT)
+ CAMLRAISEMSG("NewText");
+
+ CAMLreturn (Val_unit);
+}
+
+
+/*************************************************************************/
+
+/**
+ * XMLTree bindings
+ * All of the functions here call the _unsafe version and implement the logics themselves
+ * (test for NULLT and so on). This avoids one indirection + one call when the tests fails.
+ */
+
+