Auto XML Processing based on XSD in Oracle

Wasim Akram Shaik
Wasim Akram Shaik used Ask the Experts™
Is there an automatic parsing and processing of XML Available in Oracle..

I am aware of using DBMS_XMLPARSER and XMLDOM Api's to navigate through each node of XML using these api's using extract functions..

Was wondering, is there a way that a XML gets processed based on a pre-defined XSD.. or is there a tool which does this ??
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2012

what exactly are you trying get?

parsing to find all nodes wouldn't be too difficult but then you would still need to "do" something with them which would entail some application/data specific coding.
actually, we have got a specific requirement where in till now we had got 47 types of various XSD's through which we need to read data when XML gets generated..

ie., an XML can be of those 47 formats(every time i have to parse few nodes and read the XML attribute to know to which XSD does it belong to) and have to parse it (so as to do further processing)

Was thinking is there any way that if i specify an XSD in Database.. An incoming XML will get auto-validated from the stored XSD and will get it all values parsed and stored in some temporary table(any thing where in i could define a mapping between node and column)
when i searched in google for this...

i got a link in oracle

which prompted me to ask this question, wondering whether oracle by default provides such utilities or there any third party softwares which could do this..

because as of now we have 47 various XSD's and this can increase upto (47*23) so was thinking of a tool/software/utility which can do this.. or atleast a configurable program wherein i don't have to do coding again and again...

i agree that parsing is not difficult, but everytime a new XSD comes i have to do a change in my code...
Most Valuable Expert 2011
Top Expert 2012
you can use the isschemavalid  method of the xmltype

iterate through the schemas until you find one that passes and then parse.

there is no way to have oracle figure out on its own one schema from a set that might be valid
thanks sdstuber... your suggestion helped a bit for validating the XML and i understand now that there is noway for automatic xml parsing.. but isschemavalid will be helpful for me to validate the xml, as i have got many sources of XML's inputs.. which would reduce the overload of validating..!!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial