New toXml method added.