|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.DefaultHandler org.apache.torque.engine.database.transform.XmlToData
public class XmlToData
A Class that is used to parse an input xml schema file and creates and AppData java structure.
Nested Class Summary | |
---|---|
class |
XmlToData.ColumnValue
|
class |
XmlToData.DataRow
|
Field Summary | |
---|---|
private List<Object> |
data
|
private Database |
database
|
private File |
dtdFile
|
private static org.apache.commons.logging.Log |
log
Logging class from commons.logging |
private static SAXParserFactory |
saxFactory
|
Constructor Summary | |
---|---|
XmlToData(Database database,
String dtdFilePath)
Default custructor |
Method Summary | |
---|---|
InputSource |
getInputSource(String urlString)
get an InputSource for an URL String |
List<?> |
parseFile(String xmlFile)
|
InputSource |
resolveEntity(String publicId,
String systemId)
called by the XML parser |
void |
startElement(String uri,
String localName,
String rawName,
Attributes attributes)
Handles opening elements of the xml file. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static org.apache.commons.logging.Log log
private Database database
private List<Object> data
private File dtdFile
private static SAXParserFactory saxFactory
Constructor Detail |
---|
public XmlToData(Database database, String dtdFilePath) throws MalformedURLException, IOException
MalformedURLException
IOException
Method Detail |
---|
public List<?> parseFile(String xmlFile) throws Exception
Exception
public void startElement(String uri, String localName, String rawName, Attributes attributes) throws SAXException
startElement
in interface ContentHandler
startElement
in class DefaultHandler
SAXException
public InputSource resolveEntity(String publicId, String systemId) throws SAXException
resolveEntity
in interface EntityResolver
resolveEntity
in class DefaultHandler
SAXException
public InputSource getInputSource(String urlString) throws IOException
urlString
-
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |