Converts an array to XML