Class fr.bizolin.xml.sql.XMLDb
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class fr.bizolin.xml.sql.XMLDb

java.lang.Object
   |
   +----fr.bizolin.xml.sql.XMLDb

public class XMLDb
extends Object
SQL2XML by Bizolin (c)Cyril Vincent
www.multimania.com/cvincent/
March 2000
Manage an XML into a Database.
With this class, XML is not a text file anymore, it become a database tool.

Database structure :
NODE
NodeIdlong
Parentlong
Namevarchar2
Valuevarchar2
Typeinteger

ATTR
AttrIdlong
NodeIDlong
Namevarchar2
Valuevarchar2


Associations :
NODE-(0.*)->NODE
NODE-(0,*)->ATTR
WARNING : This class has not been tested.
This class needs the org.w3c.dom and oracle.xml.parser.v2 packages.

Version:
0.1.000315
Author:
Cyril Vincent

Constructor Index

 o XMLDb(Connection)
Manage an XML into a Database
 o XMLDb(String, String, String)
Manage an XML into a Database
 o XMLDb(String, String, String, String)
Manage an XML into a Database

Method Index

 o close()
Close the connection
 o create()
Create all the XMLDb database tables
 o drop()
Drop all the XMLDb database tables
 o load()
Load the DOM document from the database
 o main(String[])
Main program
 o save(Document)
Save the DOM document into the database
 o XML2XMLDb(String)
Load an XML file and store it into the database
 o XMLDb2XML()
Write an XML file from the database
 o XMLDb2XML(String)
Write an XML file from the database

Constructors

 o XMLDb
 public XMLDb(String driver,
              String url,
              String login,
              String password)
Manage an XML into a Database

Parameters:
driver - JDBC Driver
url - JDBC URL
login - Database login
password - Database password
 o XMLDb
 public XMLDb(String url,
              String login,
              String password)
Manage an XML into a Database

Parameters:
url - JDBC URL
login - Database login
password - Database password
 o XMLDb
 public XMLDb(Connection _connection)
Manage an XML into a Database

Parameters:
connection - Database connection

Methods

 o close
 public void close()
Close the connection

 o drop
 public void drop()
Drop all the XMLDb database tables

 o create
 public void create()
Create all the XMLDb database tables

 o save
 public void save(Document xml)
Save the DOM document into the database

Parameters:
xml - DOM document
 o load
 public Document load()
Load the DOM document from the database

Returns:
xml DOM document
 o XML2XMLDb
 public void XML2XMLDb(String uri)
Load an XML file and store it into the database

Parameters:
XML - file uri
 o XMLDb2XML
 public void XMLDb2XML(String encoding)
Write an XML file from the database

Parameters:
encoding - Java encoding
 o XMLDb2XML
 public void XMLDb2XML()
Write an XML file from the database

 o main
 public static void main(String argv[])
Main program


All Packages  Class Hierarchy  This Package  Previous  Next  Index