title: Is SQL Server XPath implementation SAX based or DOM based
body: <p>A newbie question:</p>
  
  <p>Say, I have a T-SQL like this:</p>
  
  <pre><code>     DECLARE @xml XML
           SET @xml = '&lt;r&gt;&lt;b&gt;123&lt;/b&gt;&lt;/r&gt;&lt;r&gt;&lt;b&gt;456&lt;/b&gt;&lt;/r&gt;'
        SELECT row.col.value('(b/text())[1]', 'integer') AS b_id
          FROM @xml.nodes('//r') row(col)
  </code></pre>
  
  <p>When running XPath expression, do we know whether MS Sql Server uses a SAX based parser or a DOM based one? Wanted to get clarification on this as we were thinking of using this to stage a lot of data into a temp table and do further processing on the temp table. In the interest of being polite to the data server (in terms of consuming CPU cycles), we wanted to make sure that we will not cause problems. I tried searching on the net, but couldn't get a definite answer. </p>
  
  <p>Also, should we use OPENXML and does it have any benefits over an adhoc one?</p>
  
  <p>Thanks in advance!</p>