FROM OPENXML
shreds XML into rows
What changes
- Input
- an XML document handle from sp_xml_preparedocument
- Output or change
- rowset
Syntax at a glance
FROM OPENXML <openxml_clause>
Work example
A client needs FROM OPENXML to serialize a query result into a named document shape.
Use two synthetic rows and specify stable aliases. Check escaping, null handling, and nested property names in the emitted text.
Check your work FROM OPENXML. The output from FROM OPENXML parses as the expected document and preserves the requested field names.
Open Microsoft Learn for full syntax, permissions, and details for your version.