This collection of coercion methods (i.e. as(obj, "type"))
allows users of the XML package to switch between different
representations of XML nodes and to map from an XML document to
the root node and from a node to the document.
This helps to manage the nodes