Adding formatXML method