Kelly
03-30-2000, 02:08 AM
I need to convert a record that is stored in an XML document to the parameters
of SQL Server 7.0 stored procedure calls. At the time of parsing, I know
the Schema of the document(so I have access to data types). The XML Doc
may contain multiple one-to-one or one-to-many table relationships. So it
needs to be able to update multiple tables. For example lets say I have
an XML doc like:
<Customer>
<Name>John Smith</Name>
<Age>35</Age>
<Address>
<Address1>1340 102nd St.</Address1>
<Address2></Address2>
<City>Bellevue</City>
<State>WA</State>
</Address>
<Expenses>
<Item>
<ItemID>9876</ItemID>
<Cost>398.00</Cost>
<Type>Dinner</Type>
</Item>
<Item>
....
</Item>
</Expense>
</Customer>
So, there is a 1-to-1 relationship between the customer table and the address
table and a 1-to-many relationship between the customer and Expenses table.
Since this XML doc an get fairly nested, I need convert to multiple SP calls.
(i.e sp_UpdateCustomer, sp_UpdateCustomerExpenses). How do I parse into
parameter calls?
Any help would be greatly appreciated.
of SQL Server 7.0 stored procedure calls. At the time of parsing, I know
the Schema of the document(so I have access to data types). The XML Doc
may contain multiple one-to-one or one-to-many table relationships. So it
needs to be able to update multiple tables. For example lets say I have
an XML doc like:
<Customer>
<Name>John Smith</Name>
<Age>35</Age>
<Address>
<Address1>1340 102nd St.</Address1>
<Address2></Address2>
<City>Bellevue</City>
<State>WA</State>
</Address>
<Expenses>
<Item>
<ItemID>9876</ItemID>
<Cost>398.00</Cost>
<Type>Dinner</Type>
</Item>
<Item>
....
</Item>
</Expense>
</Customer>
So, there is a 1-to-1 relationship between the customer table and the address
table and a 1-to-many relationship between the customer and Expenses table.
Since this XML doc an get fairly nested, I need convert to multiple SP calls.
(i.e sp_UpdateCustomer, sp_UpdateCustomerExpenses). How do I parse into
parameter calls?
Any help would be greatly appreciated.