Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Reading XML from .Net Application

2709801Jul 9 2014 — edited Jul 9 2014

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

This post has been answered by Jason_(A_Non) on Jul 9 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2014
Added on Jul 9 2014
3 comments
1,577 views