title: Use XML as input variable to an SP
body: <p>I am getting an XML parameter and now I want to get the data from it and use that data and call to another SP.</p>
  
  <p>Right now I am trying to split up the input xml variable.</p>
  
  <pre><code>DECLARE @XML XML Set @XML = '&lt;Products&gt;
                          &lt;product&gt;
                              &lt;id&gt;3&lt;/id&gt;
                              &lt;name&gt;Testar 3&lt;/name&gt;
                          &lt;/product&gt;
                          &lt;product&gt;
                              &lt;id&gt;6&lt;/id&gt;
                              &lt;name&gt;Testar 6&lt;/name&gt;
                          &lt;/product&gt;
                          &lt;product&gt;
                              &lt;id&gt;15&lt;/id&gt;
                              &lt;name&gt;Testar 15&lt;/name&gt;
                          &lt;/product&gt;
                      &lt;/Products&gt;'
  
  SELECT      CAST(A.B.query('./product/id/text()') AS VARCHAR(20)) as id,    CAST(A.B.query('./product/name/text()') AS VARCHAR(50)) as name  FROM @XML.nodes('/Products') as A(B)
  </code></pre>
  
  <p>But this only get me 1 row with 2 columns that look like this.</p>
  
  <pre><code>ID          Name 
  3615        Testar 3Testar 6Testar 15
  </code></pre>
  
  <p>But what I want is this</p>
  
  <pre><code>ID          Name
  3           Testar 3
  6           Testar 6
  15          Testar 15
  </code></pre>
  
  <p>What do I need to change to achive that?</p>
  
  <p>Thanks
  Magnus</p>