New methode WriteObjectDataToXml