LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives


XML-L Archives

XML-L Archives


View:

Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font

Options:

Join or Leave XML-L
Reply | Post New Message
Search Archives


Subject:

Re: XML Parser - help needed

From:

"Kale, ManishV (MED, Wipro)" <[log in to unmask]>

Reply-To:

General discussion of Extensible Markup Language <[log in to unmask]>

Date:

Mon, 23 Oct 2000 09:27:50 +0200

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (59 lines)


Hi Eugene,

The following code should help you, this is a same code that you might have
picked up from Oracle site the only diff is I have modified the line that
was giving the Depricated message. Try it and let me know. And important
thing is to get the Class used by this program from Oracle site.


import oracle.xml.sql.dml.*;
import java.sql.*;
import oracle.jdbc.driver.*;
import oracle.jdbc.*;
import java.net.*;
public class xmlwritedb
{
  public static void main(String args[]) throws SQLException
  {
    String tabName = "EMP"; // Table into which to insert XML data
    String fileName = "emp.xml"; // XML document filename

    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());

    // Initialize a JDBC connection
    Connection conn =
      DriverManager.getConnection("jdbc:oracle:oci8:Scott/Tiger@xyz");
 // Insert XML data from file (filename) into
    // database table (tabName)

        OracleXMLSave save = new OracleXMLSave(conn, tabName);

        URL url = OracleXMLSave.getURL(fileName);

    //URL url = Save.createURL(fileName);
    int rowCount = save.insertXML(url);
    System.out.println(" successfully inserted "+rowCount+
               " rows into "+ tabName);
    conn.close();
  }
}

Manish

-----Original Message-----
From: Eugene [mailto:[log in to unmask]]
Sent: Friday, October 20, 2000 8:45 PM
To: [log in to unmask]
Subject: XML Parser - help needed


We will receive an XML data file that needs to be put into our database. All
the data in the XML represent data from a single table.We are using Oracle
8.0.5 Database.We have a DTD for the XML data file.We are using JDK 1.1.7,
but we can use JDK 1.2.2 also only for this.We tried the Oracle Parser, But
there was an error while connecting to Database.

Pls help to resolve the problem.

regards
Eugene


Back to: Top of Message | Previous Page | Main XML-L Page

Permalink



LISTSERV.HEANET.IE

CataList Email List Search Powered by the LISTSERV Email List Manager