- Added method to create XML file from document object