XML order using FOR XML PATH
<p>I wrote an XML query that creates an order in the sligthly different format that I would like it to:</p>

<pre><code>select
    'sample' "@ponumber",
    'xxxxxx' "@cust",
    'yyyyyy' "@shipto",
    '999999'  "line/material",
    '20'      "line/qty",
    '777777'  "line/material",
    '20'      "line/qty"
for 
    xml path('root')
</code></pre>

<p>I get the following output:</p>

<pre><code>&lt;root ponumber="sample" cust="xxxxxx" shipto="yyyyyy"&gt;
  &lt;line&gt;
    &lt;material&gt;999999&lt;/material&gt;
    &lt;qty&gt;20&lt;/qty&gt;
     &lt;material&gt;777777&lt;/material&gt;
    &lt;qty&gt;20&lt;/qty&gt;
  &lt;/line&gt;
&lt;/root&gt;
</code></pre>

<p>The desired output is this:</p>

<pre><code>&lt;root ponumber="sample" cust="xxxxxx" shipto="yyyyyy"&gt;
  &lt;line&gt;
    &lt;material&gt;999999&lt;/material&gt;
    &lt;qty&gt;20&lt;/qty&gt;
  &lt;/line&gt;
  &lt;line&gt;
    &lt;material&gt;777777&lt;/material&gt;
    &lt;qty&gt;20&lt;/qty&gt;
  &lt;/line&gt;
&lt;/root&gt;
</code></pre>

<p>What do I need to modify in my query? </p>

<p>Thank you!</p>