title: Select records from XML column (SQL Server 2005) based on node order
body: <p>I have a column in a SQL Server 2005 table defined as an XML data type.  Is there a way to select records from this table based on the order of two nodes in that column?  For example, we have the following structure in our XML:</p>
  
  <pre><code>&lt;item&gt;
     &lt;latitude/&gt;
     &lt;longitude/&gt;
  &lt;/item&gt;
  </code></pre>
  
  <p>I want to see if there are any records that have latitude/longitude in the opposite order i.e. <code>&lt;longitude/&gt;</code> then <code>&lt;latitude/&gt;</code>.  I've tried some XPath expressions but with no luck.</p>