title: Select XML from varchar(max) column
body: <p>I have some XML data stored in a varchar(max) column on SQL Server 2005. The data is in the form (FQTN = fully qualified type name):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-16"?&gt;
  &lt;History xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;EntityViews&gt;
      &lt;EntityProxy Type="FQTN" Key="386876" /&gt;
      &lt;EntityProxy Type="FQTN" Key="387981" /&gt;
      &lt;!-- etc. --&gt;
    &lt;/EntityViews&gt;
  &lt;/History&gt;
  </code></pre>
  
  <p>How can I select Type, Key so that I get a tabular result from the XML data in this column for a single row? The table has an identity primary key named HistoryId.</p>