xml parameter in sql server stored procedure
- by npalle
I want to write a stored procedure that accept an XML parameter, parsing it's elements and inserting them in a table SQL. This is my XML:
<Lines>
<Line>
<roomlist>
<room>
<namehotel>MeSa</namehotel>
<typeroom>506671</typeroom>
<typeroomname>Dbl Standard - Tip</typeroomname>
<roomnumber>0</roomnumber>
<priceroom>444.60</priceroom>
<costroom>400.00</costroom>
<boardtype/>
<paxes>
<pax>
<name>EU</name>
<lastname>CADO</lastname>
<typepax>Adult</typepax>
</pax>
<pax>
<name>LIN</name>
<lastname>BAC</lastname>
<typepax>Adult</typepax>
</pax>
</paxes>
</room>
</roomlist>
</Line>
</Lines>
How can do that?