The XML module of the DataType Utility allows you to take an XML document and convert it to a string.
To output an XML document as a string, simply call the format() function of the Y.XML class:
format()