Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


How Do You Insert XML Document To Oracle Database Using INSPROC

Posted on 2005-04-28
Medium Priority
Last Modified: 2012-05-05
I am having problem inserting an XML document into an Oracle database. this is what i have:

my $sql = "<?xml version="1.0"?>

eval {
     my $cursor = $dbh->prepare(q{
            INSPROC('member', '$sql' );

$dbh is a handle that has already been defined and working properly.

The problem i have is whenever I run this Perl script I always get a Java error saying that :
Java exception: oracle.xml.sql.OracleXMLSQLException: Start of root element expected.

If I hardcode the XML document string  in the INSPROC call, it works fine. It inserts the data into the table member. It is always when I pass in $sql. It seems to me that it cannot find an XML document when i pass in $sql.
Question by:buru
1 Comment
LVL 85

Accepted Solution

ozo earned 2000 total points
ID: 13890563
my $sql = "<?xml version="1.0"?>

#is not a valid Perl statement due to unbalanced quotes

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question