Daily Archives: February 26, 2017

SQL Server actually supports two kinds of XML objects: typed and untyped. What distinguishes the two is whether the XML column, variable, or parameter is associated with a specific schema collection, a database entity (like a table or stored procedure) that specifies the structure and data types that an XML […]

SQL Server Typed XML using XSD

A really good source of SQL Server information is the website SQL Server Central. If you are interested in learning about XML in SQL Server you can have a look at their Stairway to XML series of articles. The XML data type is discussed in the second level. The XML […]

SQL Server XML Data Type

XPath is a major element in the XSLT standard. XPath can be used to navigate through elements and attributes in an XML document. With XSLT you can transform an XML document into HTML. XSLT (eXtensible Stylesheet Language Transformations) is the recommended style sheet language for XML. XSLT is far more […]

XML and XPath

DOM stands for Document Object Model. To best understand what the DOM is, we will briefly discuss the HTML DOM first. When a web page is loaded, the browser creates a Document Object Model of the page. The DOM is a W3C (World Wide Web Consortium) standard. The DOM defines […]


This post continues from the post on XML Trees and discusses the two different styles of writing XML documents. Generally you should choose elements over attributes, with the exception of metadata, as w3schools.com explains. In the first example gender is an attribute. In the last, gender is an element. Both […]

XML Attributes vs. Elements

XML documents form a tree structure that starts at “the root” and branches to “the leaves“. XML documents are formed as element trees. An XML tree starts at a root element and branches from the root to child elements. All elements can have sub elements (child elements). The terms parent, […]

XML Tree