added getXML() function