|
|||||||||||
| 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.turbine.services.intake.transform.XmlToAppData
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.
| Constructor Summary | |
XmlToAppData()
Creates a new instance of the Intake XML Parser |
|
| Method Summary | |
void |
characters(char[] mesgArray,
int start,
int length)
Handles the character data, which we are using to specify the error message. |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName)
Handles closing Elements of the XML file |
void |
error(org.xml.sax.SAXParseException spe)
Callback function for the xml parser to give errors. |
void |
fatalError(org.xml.sax.SAXParseException spe)
Callback function for the xml parser to give fatalErrors. |
AppData |
parseFile(java.lang.String xmlFile)
Parses a XML input file and returns a newly created and populated AppData structure. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
EntityResolver implementation. |
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)
Callback function for the xml parser to give warnings. |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, 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 |
| Constructor Detail |
public XmlToAppData()
| Method Detail |
public AppData parseFile(java.lang.String xmlFile)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
xmlFile - The input file to parse.
xmlFile.
javax.xml.parsers.ParserConfigurationException - When a serious parser configuration problem occurs.
org.xml.sax.SAXException - When a problem parsing the XML file occurs.
java.io.IOException - When an I/O error occurs.
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
publicId - The public identifer, which might be null.systemId - The system identifier provided in the XML document.
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
org.xml.sax.Attributes attributes)
uri - The current namespace URI.localName - The local name (without prefix), or the empty string if Namespace processing is not being performed.rawName - The qualified name (with prefix), or the empty string if qualified names are not available.attributes - The specified or defaulted attributes.
public void characters(char[] mesgArray,
int start,
int length)
mesgArray - The characters.start - The start position in the character array.length - The number of characters to use from the character array.
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName)
uri - The current namespace URI.localName - The local name (without prefix), or the empty string if Namespace processing is not being performed.rawName - The qualified name (with prefix), or the empty string if qualified names are not available.public void warning(org.xml.sax.SAXParseException spe)
spe - a SAXParseException valuepublic void error(org.xml.sax.SAXParseException spe)
spe - a SAXParseException valuepublic void fatalError(org.xml.sax.SAXParseException spe)
spe - a SAXParseException value
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||