title: XML Parsing & T-SQL
body: <p>Given the following from an XML field in a table:</p>
  
  <pre><code>    &lt;View&gt;
        &lt;Criminal xmlns="http://tempuri.org/crimes.xsd"&gt;
          &lt;Person&gt;
            &lt;PersonID&gt;1234&lt;/PersonID&gt;
            &lt;LastName&gt;SMITH&lt;/LastName&gt;
            &lt;FirstName&gt;KEVIN&lt;/FirstName&gt;
          &lt;Cases&gt;
            &lt;PersonID&gt;1234&lt;/PersonID&gt;
            &lt;CaseNumber&gt;12CASE34&lt;/CaseNumber&gt;
          &lt;/Cases&gt;
         &lt;/Person&gt;
        &lt;/Criminal&gt;
       &lt;/View&gt;
  </code></pre>
  
  <p>How would I pull the Person/PersonID, LastName, Firstname info?  Same goes for the CaseNumber.</p>
  
  <p>My next issue is similar to above but lets add a second namespace:</p>
  
  <pre><code>&lt;MessageContent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
     &lt;Content&gt;Content in here!!&lt;/Content&gt;
     &lt;Type&gt;Empty&lt;/Type&gt;
  &lt;/MessageContent&gt;
  </code></pre>
  
  <p>Notice I have 2 namespaces in there AND they also have ":xsi" and ":xsd" in there too.  I think those are referred to as schemas.</p>