|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.apache.torque.engine.database.transform.XmlToData
A Class that is used to parse an input xml schema file and creates and
AppData java structure.
It uses apache Xerces to do the xml parsing.
| Nested Class Summary | |
class |
XmlToData.ColumnValue
|
class |
XmlToData.DataRow
|
| Field Summary | |
private java.util.List |
data
|
private Database |
database
|
private org.xml.sax.InputSource |
dataDTD
|
private java.io.File |
dtdFile
|
private java.lang.String |
dtdFileName
|
private java.lang.String |
errorMessage
|
private static javax.xml.parsers.SAXParserFactory |
saxFactory
|
| Constructor Summary | |
XmlToData(Database database,
java.lang.String dtdFilePath)
Default custructor |
|
| Method Summary | |
void |
error(org.xml.sax.SAXParseException spe)
Error callback. |
void |
fatalError(org.xml.sax.SAXParseException spe)
Fatal error callback. |
org.xml.sax.InputSource |
getInputSource(java.lang.String urlString)
get an InputSource for an URL String |
java.util.List |
parseFile(java.lang.String xmlFile)
|
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
called by the XML parser |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
org.xml.sax.Attributes attributes)
Handles opening elements of the xml file. |
void |
warning(org.xml.sax.SAXParseException spe)
Warning callback. |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private Database database
private java.lang.String errorMessage
private java.util.List data
private java.lang.String dtdFileName
private java.io.File dtdFile
private org.xml.sax.InputSource dataDTD
private static javax.xml.parsers.SAXParserFactory saxFactory
| Constructor Detail |
public XmlToData(Database database,
java.lang.String dtdFilePath)
throws java.net.MalformedURLException,
java.io.IOException
| Method Detail |
public java.util.List parseFile(java.lang.String xmlFile)
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
org.xml.sax.Attributes attributes)
startElement in interface org.xml.sax.ContentHandlerpublic void warning(org.xml.sax.SAXParseException spe)
warning in interface org.xml.sax.ErrorHandlerspe - The parse exception that caused the callback to be invoked.public void error(org.xml.sax.SAXParseException spe)
error in interface org.xml.sax.ErrorHandlerspe - The parse exception that caused the callback to be invoked.public void fatalError(org.xml.sax.SAXParseException spe)
fatalError in interface org.xml.sax.ErrorHandlerspe - The parse exception that caused the callback to be invoked.
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
resolveEntity in interface org.xml.sax.EntityResolverpublic org.xml.sax.InputSource getInputSource(java.lang.String urlString)
urlString -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||