Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> HELP: XML-0108: (Fatal Error) Start of root element expected

HELP: XML-0108: (Fatal Error) Start of root element expected

From: GengBo <bgeng_at_szdhd.sz.lucent.com>
Date: Wed, 19 Sep 2001 20:33:03 +0800
Message-ID: <3BA8907F.1673B47A@szdhd.sz.lucent.com>


All,

When I attempt to storing XML file to Oracle using Oracle XSU, I got the following exception:

<Line 1, Column 1>: XML-0108: (Fatal Error) Start of root element expected.
Exception in thread "main" oracle.xml.sql.OracleXMLSQLException: Start of root element expected.

        at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2093)
        at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1083)
        at XML2DB.main(XML2DB.java:20)

Anybody has some idea about it? Thanks.

XML file:
<?xml version = '1.0'?>
<ROWSET>

   <ROW num="1">

      <TID>15</TID>
      <HOSTNAME>localhost</HOSTNAME>
      <INFO>asldkjf</INFO>

   </ROW>
</ROWSET>

Java file storing XML to Oracle:

                Connection conn = getConnection( dblink, user, passwd );

                OracleXMLSave sav = new OracleXMLSave(conn, "test");
                // Assume that the user passes in this document. Save it in to
the table.!
                if ( argv.length != 1 ) {
                        System.out.println("Usage: java XML2DB xmlfilename");
                        return ;
                }
                sav.insertXML(argv[0]);
                sav.close();




Received on Wed Sep 19 2001 - 07:33:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US