title: Query results same when using xml raw,element and xml path
body: <p>I am using sql-server 2012:</p>
  
  <p>I have query like this:</p>
  
  <pre><code>CREATE TABLE #XmlTestTable 
  (
      ID INT PRIMARY KEY IDENTITY(1,1),
      FirstName VARCHAR(20),
      LastName VARCHAR(20)
  )
  INSERT INTO #XmlTestTable (FirstName,LastName) VALUES
  ('John','Doe'),
  ('Jane','Doe'),
  ('Brian','Smith'),
  ('Your','Mom')
  
  SELECT * FROM #XmlTestTable FOR XML RAW, ELEMENTS --1
  SELECT * FROM #XmlTestTable FOR XML PATH --2
  </code></pre>
  
  <p>Result of 1:</p>
  
  <pre><code>&lt;row&gt;
    &lt;ID&gt;1&lt;/ID&gt;
    &lt;FirstName&gt;John&lt;/FirstName&gt;
    &lt;LastName&gt;Doe&lt;/LastName&gt;
  &lt;/row&gt;
  &lt;row&gt;
    &lt;ID&gt;2&lt;/ID&gt;
    &lt;FirstName&gt;Jane&lt;/FirstName&gt;
    &lt;LastName&gt;Doe&lt;/LastName&gt;
  &lt;/row&gt;
  &lt;row&gt;
    &lt;ID&gt;3&lt;/ID&gt;
    &lt;FirstName&gt;Brian&lt;/FirstName&gt;
    &lt;LastName&gt;Smith&lt;/LastName&gt;
  &lt;/row&gt;
  &lt;row&gt;
    &lt;ID&gt;4&lt;/ID&gt;
    &lt;FirstName&gt;Your&lt;/FirstName&gt;
    &lt;LastName&gt;Mom&lt;/LastName&gt;
  &lt;/row&gt;
  </code></pre>
  
  <p>Result of 2:</p>
  
  <pre><code>&lt;row&gt;
    &lt;ID&gt;1&lt;/ID&gt;
    &lt;FirstName&gt;John&lt;/FirstName&gt;
    &lt;LastName&gt;Doe&lt;/LastName&gt;
  &lt;/row&gt;
  &lt;row&gt;
    &lt;ID&gt;2&lt;/ID&gt;
    &lt;FirstName&gt;Jane&lt;/FirstName&gt;
    &lt;LastName&gt;Doe&lt;/LastName&gt;
  &lt;/row&gt;
  &lt;row&gt;
    &lt;ID&gt;3&lt;/ID&gt;
    &lt;FirstName&gt;Brian&lt;/FirstName&gt;
    &lt;LastName&gt;Smith&lt;/LastName&gt;
  &lt;/row&gt;
  &lt;row&gt;
    &lt;ID&gt;4&lt;/ID&gt;
    &lt;FirstName&gt;Your&lt;/FirstName&gt;
    &lt;LastName&gt;Mom&lt;/LastName&gt;
  &lt;/row&gt;
  </code></pre>
  
  <p>both the queries give same results,?</p>
  
  <p>How do I find out the difference and when to use xml path or xml elements
  Sql-server 2012 compiled on.</p>