CxmlProvide types and pretty printing for XML.
type document = {version : string;Version, usually 1.0
*)encoding : string;Encoding (only current encoding supported now)
*)standalone : bool;Standalone attribute
*)element : node;Document root element
*)}Representation of an XML document.
validate_identifiers elt validates that identifiers in the document are unique and non-empty.
deduplicate elt traverses elt and removes all sub-elements with duplicating identifiers.
When several elements have the same identifier the first (in the DSF traversal order) element is preserved and all subsequent are removed.
If all children of a parent are duplicates of some other elements, then the father is still preserved with an empty list of children (unless it is itself a duplicate of some other element).
val new_attr : string -> string -> attrBuild an attribute.
val new_text : string -> nodeBuild a new text node.
val output_attr : out_channel -> (string * string) -> unitOutput an attribute.
val output_node : out_channel -> string -> node -> unitOutput a node on the given channel.
val output_doc : out_channel -> document -> unitOutput an XML document to the given output channel.
val output : document -> unitOutput the given XML document on the standard output.
val output_file : string -> document -> unitOutput the given XML document on the named file.