Added a class toXML.