Removes the internal representation of the XML document specified by the document handle and invalidates the document handle.
|Applies to: SQL Server (SQL Server 2008 through current version).|
Is the handle to the newly created document. A handle that is not valid returns an error. hdoc is an integer.
0 (success) or >0 (failure)
Requires membership in the public role.
The following example removes the internal representation of an XML document. The handle to the document is provided as input.
EXEC sp_xml_removedocument @hdoc;