PlumberSurplus.com Ecommerce and Entrepreneurship Blog | About | Contact | PlumberSurplus.com Store

SQL Server 2005 XML Quick Reference

Posted on April 1, 2010 by Trevor

If you've paid attention at all to the technologies behind web platforms recently, you'll know that XML has had a lot of both fanfare and debate surrounding it. XML is a data language, a way to wrap data in order to preserve its structure. It's quite simple and similar to HTML, which led to easy and wide adoption by web developers. However, although XML itself is simple, working with it is not. There are several competing languages intended to translate XML data into documents that can be either viewed by people or parsed by programs. Furthermore, while these secondary languages are standardized, their implementations may not be.

SQL Server is one example of a non-standard implementation. SQL Server 2005 implements XQuery, perhaps the most widely-used XML handling language in the database realm. However, it leaves out many features of XQuery and adds a few of its own. For a SQL Server admin or developer learning about XQuery, this can get very confusing as most resources are targeted at the standard rather than SQL Server's implementation, which means large parts of them don't work or apply. There are a few good resources like MSDN's Introduction, but one of the resources I couldn't find was a quick reference sheet.

Quick reference (or "cheat") sheets condense as much relevant information as possible about a subject onto a limited number of printable pages (usually two: the front and back of a single sheet). They're especially useful when you have the general ideas down but need to look up specific points (say, when you're trying something out that you just learned). There are plenty of good XML and XQuery quick reference sheets (those put out by Mulberry Technologies are especially good), but surprisingly I couldn't find one that specifically addressed the peculiarities of SQL Server's XML handling. So, because it would help me learn it myself, I decided to create one.

The following quick reference sheet is for SQL Server 2005's XML data type. It assumes a working knowledge of SQL Server and XML at least, so if you're not versed in the particulars you may want to pass it off to your developer or database administrator. However, I'm by no means an expert in this field, so if you notice any errors or omissions, please let me know and I'll do my best to update it. Of course, as always, neither I nor Gordian Project can make any guarantees as to support or liability regarding this quick reference sheet.

 

 

 


Little Giant has been hard at work engineering pumps that their most loyal customers have been waiting for. PlumberSurplus.com is your destination for the new Little Giant TSW Sump Pump System and their NXTGen Condensate Pumps.

blog comments powered by Disqus