public class SQLXMLReader extends java.lang.Object implements SQLXMLConstants
read() methods. Otherwise
you can implement your own reader class which calls the
readDatabase() method to read a certain part of the document.FULL_SCHEMA_LOCATION, NAMESPACE_URI, TAG_DB, TAG_DB_DRIVER, TAG_DB_HOST, TAG_DB_NAME, TAG_DB_PASSWORD, TAG_DB_USER, TAG_TABLE_PREFIX, VERSION| Constructor and Description |
|---|
SQLXMLReader(javax.xml.namespace.QName rootTag)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
ConcreteSQLProperties |
read(java.io.File file) |
ConcreteSQLProperties |
read(java.io.InputStream stream) |
ConcreteSQLProperties |
read(java.io.Reader r) |
ConcreteSQLProperties |
read(java.lang.String data) |
static void |
readDatabase(javax.xml.stream.XMLEventReader reader,
SQLProperties properties)
Reads information information about a database connection from a XML-document.
|
public SQLXMLReader(javax.xml.namespace.QName rootTag)
rootTag - the root tag of the document to read.public static void readDatabase(javax.xml.stream.XMLEventReader reader, SQLProperties properties) throws javax.xml.stream.XMLStreamException
<Host>host</Host> <Name>name</Name> <User>user</User> <Password>password</Password> <Driver>com.mysql.jdbc.Driver</Driver> <TablePrefix>tablePrefix</TablePrefix>
reader - properties - javax.xml.stream.XMLStreamExceptionpublic ConcreteSQLProperties read(java.io.Reader r) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamExceptionpublic ConcreteSQLProperties read(java.io.InputStream stream) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamExceptionpublic ConcreteSQLProperties read(java.lang.String data) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamExceptionpublic ConcreteSQLProperties read(java.io.File file) throws javax.xml.stream.XMLStreamException, java.io.FileNotFoundException
javax.xml.stream.XMLStreamExceptionjava.io.FileNotFoundException