|
iiitToolkit 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xml.sax.helpers.DefaultHandler | +--de.iiit.xmlconfig.ConfigReader
Configuration.load(java.lang.String)
instead.
Reads a XML configuration file using Apache Xerces as a SAX parser. It extends the Xerces class DefaultHandler with its own implemetation of startElement() and endElement().
Configuration
Constructor Summary | |
ConfigReader()
Deprecated. Creates a new instance of ConfigReader |
Method Summary | |
void |
endElement(String uri,
String localName,
String qName)
Deprecated. Implementation of the call-back method defined in Xerces' DefaultHandler |
Configuration |
readConfigFile(String filename)
Deprecated. This is the main method of this class. |
void |
startElement(String uri,
String localName,
String qName,
Attributes attrs)
Deprecated. Implementation of the call-back method defined in Xerces' DefaultHandler |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ConfigReader()
Method Detail |
public void startElement(String uri, String localName, String qName, Attributes attrs)
startElement
in interface ContentHandler
startElement
in class DefaultHandler
uri
- The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.localName
- The local name (without prefix), or the empty string if Namespace processing is not being performed.qName
- The qualified name (with prefix), or the empty string if qualified names are not available.attrs
- The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.public void endElement(String uri, String localName, String qName)
endElement
in interface ContentHandler
endElement
in class DefaultHandler
uri
- The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.localName
- The local name (without prefix), or the empty string if Namespace processing is not being performed.qName
- The qualified XML 1.0 name (with prefix), or the empty string if qualified names are not available.public Configuration readConfigFile(String filename) throws FileNotFoundException, IOException, SAXException
filename
- The name of the file to read.
FileNotFoundException
- any exception occuring while reading and parsing the file is passed through.
IOException
- any exception occuring while reading and parsing the file is passed through.
SAXException
- any exception occuring while reading and parsing the file is passed through.Configuration
|
iiitToolkit 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |