Sign In/My Account | View Cart  
advertisement

Article:
 Storing XML in Relational Databases
Subject: how to transfer data from xml document to database tables?
Date: 2003-03-25 09:38:43
From: manas mallik

i am doing my project in these lines so i need to know how to transfer data from xml document to database tables taking into account i already have the required tables created.

Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • how to transfer data from xml document to database tables?
    2003-07-14 19:58:21 Igor Dayen

    You may consider using xPersistence Utility
    (www.objcentric.com).
    XML data is stored in persistent DOM tables
    (NodeDef, DimensionDef, others).
    Out of these tables you may copy data into
    your tables using regular SQL.
    Here are brief "HOW-TO" instructions:


    A. Installation instructions
    ============================
    Prerequisites:
    download and install
    OLAP-support General-Purpose Database Objects
    (see xdb\readme.txt)



    (i) add jar-file xdbEval.jar to the class path,
    see samples:
    setclasspathEval.bat [Evaluation copy],
    setclasspath.bat [Commercial version]


    (ii) Xerces jar-files are already included into download;
    alternatively, download Xerces XML parser:
    http://xml.apache.org/dist/xerces-j/


    (iii) add xerces.jar to the %classpath%


    (iv) add xercesSamples.jar to the %classpath% [for evaluation copy only]


    B. Use cases
    ============
    0. Install database properties in user.home:
    Default settings for Windows:
    Documents and Settings\user name\ocsdb.ini:
    dbname: xdb
    user:sa (default)
    pwd: (default)
    driver: sun.jdbc.odbc.JdbcOdbcDriver (default)
    url: jdbc:odbc:LocalServer (default)
    1. x-Persistence Utility employs
    OLAP-support General-Purpose Database Objects.
    Default dimension for storing XML documents is "xml".
    2. To store XML document in the database:
    cd XPersistence
    cd samples
    java com.objcentric.xdb.XPersistence -c personal.xml >nul
    3. To get root node IDs for the stored XML document(s):
    get_tree_roots <dimension>
    4. To get stored XML nodes:
    get_tree <nodeID>



Sponsored By: