troubleshooting Question

Parse XML File for Insert into PL/SQL tables - Oracle 10g

Avatar of pjmorris5
pjmorris5 asked on
Oracle DatabaseXML
6 Comments1 Solution16208 ViewsLast Modified:
I am very new to XML and I have been reading lots of material related to parsing an XML file to insert data into an Oracle database (10g) ...but I'm not sure how to handle my current stumbling block.  I've found several 'close' references to similar issues, but I haven't figured out what I need to do to get past this step.

I have created a procedure to parse an XML file and load the data elements into one or more tables.  My issue currently is in accessing the XML file.

...xml_file is passed into the procedure.  It's set to varchar2; entered as '/opt/data/ext/test.xml'

docXML  xmldom.DomDocument;
parser    xmlparser.parser;
xmlparser.parse(parser, xml_file);
docXML :=xmlparser.getDocument(parser);
xmlparser.freeParser(parser);

With the above syntax I am getting ORA-31001: Invalid resource handle or path name "/opt/data/ext/test.xml".  The file exists as does the directory.  Some internet searching suggested "the path must be created in xml db repository".   If this is true, what does it mean?  

Separate question which may be a little stupid; as I said, I'm very new to this ...I've registered the schema ...how is the XML validated against it?  Is this a separate 'call' before parsing or is there logic within the parsing module which does the validation?

Thanks much!
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros