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 |
| NodeId | long |
| Parent | long |
| Name | varchar2 |
| Value | varchar2 |
| Type | integer |
| ATTR |
| AttrId | long |
| NodeID | long |
| Name | varchar2 |
| Value | varchar2 |
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
-
XMLDb(Connection)
- Manage an XML into a Database
-
XMLDb(String, String, String)
- Manage an XML into a Database
-
XMLDb(String, String, String, String)
- Manage an XML into a Database
-
close()
- Close the connection
-
create()
- Create all the XMLDb database tables
-
drop()
- Drop all the XMLDb database tables
-
load()
- Load the DOM document from the database
-
main(String[])
- Main program
-
save(Document)
- Save the DOM document into the database
-
XML2XMLDb(String)
- Load an XML file and store it into the database
-
XMLDb2XML()
- Write an XML file from the database
-
XMLDb2XML(String)
- Write an XML file from the database
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
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
XMLDb
public XMLDb(Connection _connection)
- Manage an XML into a Database
- Parameters:
- connection - Database connection
close
public void close()
- Close the connection
drop
public void drop()
- Drop all the XMLDb database tables
create
public void create()
- Create all the XMLDb database tables
save
public void save(Document xml)
- Save the DOM document into the database
- Parameters:
- xml - DOM document
load
public Document load()
- Load the DOM document from the database
- Returns:
- xml DOM document
XML2XMLDb
public void XML2XMLDb(String uri)
- Load an XML file and store it into the database
- Parameters:
- XML - file uri
XMLDb2XML
public void XMLDb2XML(String encoding)
- Write an XML file from the database
- Parameters:
- encoding - Java encoding
XMLDb2XML
public void XMLDb2XML()
- Write an XML file from the database
main
public static void main(String argv[])
- Main program
All Packages Class Hierarchy This Package Previous Next Index