SQL Flow Field Guide

sp_xml_preparedocument

Check SQL Server version support in the source

Reads the XML text provided as input, parses the text by using the MSXML parser, and provides the parsed document.

What changes

Input
Not stated in the Microsoft summary.
Output or change
Not stated in the Microsoft summary.

Syntax at a glance

sp_xml_preparedocument hdoc OUTPUT
    [ , xmltext ]
    [ , xpath_namespaces ]
[ ; ]

Work example

Reads the XML text provided as input, parses the text by using the MSXML parser, and provides the parsed document.

Read the syntax and examples. Explain each argument and its effect before writing a call.

Check your work Which inputs are required, and what result or effect does the page document?

Open Microsoft Learn for full syntax, permissions, and details for your version.