Dear Oracle Developers:
I am hoping someone could give me some help, pointers or good websites, as I haven't been able to find anything to help me understand how to do the following.
I have a stored procedure that is getting an XML document from our application team. They have a C# .Net Dataset that is being converted to XML using the following line of code:
xml = ds.GetXml();
so now that we have the XML from the dataset, we are passing the XML to the stored procedure with the following line of code:
mCommand.Parameters.Add("@XML", OracleDbType.XmlType, pXML, ParameterDirection.Input);
My question is: how do I use this XML inside my stored procedure? I need to loop through this XML (it can be a couple, to a couple hundred elements) and process each item. Normally, I would just use a cursor to process each record in a recordset, but I am not sure how to use XML like I would a recordset. Is there someway to convert XML to a recordset (I wouldn't think it be that easy), and if not, how could I use XML in the way I think of a recordset, in that I would loop through it to process each "row" individually, pulling out the elements and attributes?
Any help you could provide would be greatly appreciated as Google hasn't been able to answer my questions at this time.
Thanks
Andy