Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 1.78 KB

File metadata and controls

38 lines (30 loc) · 1.78 KB
title XML System Stored Procedures | Microsoft Docs
ms.custom
ms.date 06/13/2017
ms.prod sql-server-2014
ms.reviewer
ms.technology xml
ms.topic conceptual
helpviewer_keywords
system stored procedures [SQL Server], XML
sp_xml_removedocument
OPENXML statement, system stored procedures
sp_xml_preparedocument
XML [SQL Server], system stored procedures
ms.assetid e60c7f85-6823-4d28-93d6-b053d08cc830
author MightyPen
ms.author genemi
manager craigg

XML System Stored Procedures

SQL Server provides the following system stored procedures that are used together with OPENXML:

To write queries by using OPENXML, you must first create an internal representation of the XML document by calling sp_xml_preparedocument. The stored procedure returns a handle to the internal representation of the XML document. This handle is then passed to OPENXML. OPENXML provides rowset views of the document based on XPaths. Specifically, this is one row pattern and one or more column patterns.

Note

The document handle that is returned by sp_xml_preparedocument is valid for the duration of the session.

The internal representation of an XML document can be removed from memory by calling the sp_xml_removedocument system stored procedure.

See Also

OPENXML (Transact-SQL)
OPENXML (SQL Server)