Module Make_with_wrapped_functions.Xml
Underlying XML data-structure
The type variables in elt
and attrib
are know as phantom types. The implementation, defined here, is actually monomorphic.
In particular, tyxml doesn't impose any overhead over the underlying representation. The tot
and toelt
functions allows to convert between the typed and the untyped representation without any cost.
Note that some implementation may not be iterable or printable, such as the Dom representation exposed by js_of_ocaml.