XML document is now correctly deallocated