Chapter 15. XML and SQL Server: OPENXML

Generally, in battle, use the normal force to engage; use the extraordinary to win.

Sun Tzu[1]

[1] Tzu, Sun. The Art of War. Cambridge, England: Oxford University Press, 1963. Page 91.

In this chapter we'll talk about SQL Server's OPENXML() function and how it's used to read XML documents. We'll also touch on the new features and changes coming in the forthcoming XML for SQL Server Web Release 1. This will be the final chapter in our coverage of SQL Server's XML functionality.

OPENXML() is a built-in Transact-SQL function that can return an XML document as a rowset. In conjunction with sp_xml_preparedocument and sp_xml_removedocument, OPENXML() allows you to break down (or shred) nonrelational XML documents ...

Get Guru's Guide to SQL Server™ Stored Procedures, XML, and HTML, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.