public class SQLXMLReader extends 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(QName rootTag)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
ConcreteSQLProperties |
read(File file) |
ConcreteSQLProperties |
read(InputStream stream) |
ConcreteSQLProperties |
read(Reader r) |
ConcreteSQLProperties |
read(String data) |
static void |
readDatabase(XMLEventReader reader,
SQLProperties properties)
Reads information information about a database connection from a XML-document.
|
public SQLXMLReader(QName rootTag)
rootTag
- the root tag of the document to read.public static void readDatabase(XMLEventReader reader, SQLProperties properties) throws XMLStreamException
<Host>host</Host> <Name>name</Name> <User>user</User> <Password>password</Password> <Driver>com.mysql.jdbc.Driver</Driver> <TablePrefix>tablePrefix</TablePrefix>
reader
- properties
- XMLStreamException
public ConcreteSQLProperties read(Reader r) throws XMLStreamException
XMLStreamException
public ConcreteSQLProperties read(InputStream stream) throws XMLStreamException
XMLStreamException
public ConcreteSQLProperties read(String data) throws XMLStreamException
XMLStreamException
public ConcreteSQLProperties read(File file) throws XMLStreamException, FileNotFoundException