I was wondering if anyone could point me to a tutorial or give me suggestions on processing an XML "Request For Quote" document. Using SQL Server 2005. For example:
<MyQuote>
<Header>
<Customer>XYZ</Customer>
<Material>Wood&</Material>
<Header>
<LineItems>
<Line>
<Quantity>32</Quantity>
<Model>Chair 350</Model>
<Color>Red</Color>
</Line>
.
</LineItems>
</MyQuote>
Just getting my feet wet with XQuery. I need to shred this doc into individual Line Items, identify each one with a number, validate them calc a price. Also need to be able to add/edit/delete any one. I can see how to get the lines into a table, but not how to ID them with a sequential number and apply a Stored Procedure to them. I need to randomly be able to process any request such as validate line 6
, calc price for line 3
delete line 4
, change line 2 to Yellow
, etc.
I'm assuming the best way is to store the entire document as an XML column and transact against it as opposed to shredding and storing individual line items in a relational table?
Any advice, code, urls, etc would be greatly appreciated.