O'Reilly logo

Guru's Guide to SQL Server™ Stored Procedures, XML, and HTML, The by Ken Henderson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required