org.jtools.xsql
Class XSqlParser

java.lang.Object
  extended byorg.jtools.xsql.XSqlParser

public class XSqlParser
extends java.lang.Object

 Simple XML parser used for creating SQL DDL
 CREATE, INSERT, or DROP scripts.  XSqlParser
 is capable of populating databases for any
 RDBMS I/O intensive development or testing.

 requires sqlschema.xml for XML structure
 requires sqlschema.dtd for XML validation
 

Version:
$Id: XSqlParser.java,v 1.8 2002/08/07 20:44:53 placson Exp $
Author:
Patrick Lacson (patrick@lacson.org)

Constructor Summary
XSqlParser()
          Constructor
 
Method Summary
 void createDdl(XSqlType type, java.lang.String outfile)
          Creates the DDL scripts
 boolean process(java.lang.String url)
          Process the URL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSqlParser

public XSqlParser()
Constructor

Method Detail

process

public boolean process(java.lang.String url)
                throws java.net.MalformedURLException
Process the URL

Parameters:
url - a java.net.URL path
Throws:
java.net.MalformedURLException - if URL is invalid or missing protocol (e.g. http, file, ftp)

createDdl

public void createDdl(XSqlType type,
                      java.lang.String outfile)
               throws java.io.IOException
Creates the DDL scripts

Parameters:
type - XSqlType enum for CREATE, INSERT, or DROP
outfile - the path to the output file (e.g. xsql.output.sql)
Throws:
java.io.IOException - if failure to write to file