title: Why OPENXML only returns one element
body: <p>Can somebody explain me why this T-SQL code only returns one row with the value "1"? I was expecting to get two rows ("1" and "2"). Am I missing something here?</p>
  
  <pre><code>DECLARE @XMLDoc2 XML
  SELECT @XMLDoc2 = '&lt;ids&gt;&lt;id&gt;1&lt;/id&gt;&lt;id&gt;2&lt;/id&gt;&lt;/ids&gt;'
  
  DECLARE @handle2 INT
  
  EXEC sp_xml_preparedocument @handle2 OUTPUT, @XMLDoc2
  
  SELECT * FROM OPENXML (@handle2, '/ids', 2) WITH (id INT 'id') 
  
  EXEC sp_xml_removedocument @handle2
  </code></pre>
  
  <p><strong>NOTE</strong>: I'm using SQL Server 2008</p>
  
  <p>Thanks a lot!</p>