|
Hilbert II - Version 0.03.01 | ||||||||||
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.qedeq.kernel.xml.parser.SaxDefaultHandler
Default SAX handler. Delegates SAX events to a
AbstractSimpleHandler
which could also delegate events to other
AbstractSimpleHandler
s.
Before anything is parsed the method setExceptionList(ExceptionList)
must be
called.
Constructor Summary | |
SaxDefaultHandler()
Constructor. |
Method Summary | |
void |
changeHandler(AbstractSimpleHandler newHandler,
String elementName,
SimpleAttributes attributes)
Change current handler to new one. |
void |
characters(char[] ch,
int start,
int length)
|
SAXParseException |
createSAXParseException(Exception e)
Wraps exception in new SAXParseException including parsing position information. |
SAXParseException |
createSAXParseException(String message)
Creates new SAXParseException including parsing position information. |
void |
endDocument()
|
void |
endElement(String uri,
String localName,
String qName)
|
int |
getLevel()
Get current level. |
void |
setBasisDocumentHandler(AbstractSimpleHandler handler)
Set basis handler for documents. |
void |
setDocumentLocator(Locator locator)
Receive a Locator object for document events. |
void |
setExceptionList(ExceptionList errorList)
Set parse exception list. |
void |
setUrl(URL url)
Set file that is parsed. |
void |
startDocument()
|
void |
startElement(String uri,
String localName,
String qName,
Attributes amap)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SaxDefaultHandler()
Method Detail |
public final void setExceptionList(ExceptionList errorList)
errorList
- Collect errors here.public final void setDocumentLocator(Locator locator)
locator
- A locator for all SAX document events.ContentHandler.setDocumentLocator(org.xml.sax.Locator)
,
Locator
public final void setBasisDocumentHandler(AbstractSimpleHandler handler)
handler
- Basis handler for documents. This handler might also pass control to
another handler via the
AbstractSimpleHandler.changeHandler(AbstractSimpleHandler, String, SimpleAttributes)
method.public final void startDocument() throws SAXException
SAXException
public final void endDocument() throws SAXException
SAXException
public final void startElement(String uri, String localName, String qName, Attributes amap) throws SAXException
SAXException
public final void endElement(String uri, String localName, String qName) throws SAXException
SAXException
public final void characters(char[] ch, int start, int length)
public final void changeHandler(AbstractSimpleHandler newHandler, String elementName, SimpleAttributes attributes) throws SyntaxException
AbstractSimpleHandler.init()
.
The new handler also gets a AbstractSimpleHandler.startElement(String,
SimpleAttributes)
event.
The current handler is stacked. After the new handler gets the appropriate endElement
event, the control is switched back to the old handler.
The switch back is also done, if the tag level gets back to the same number. That means
if for example the new handler starts with the <banana>
tag, the
old handler is restored when the misspelled </bnana>
tag occurs:
<banana> <one /> <two > <one /> <one /> </two > </bnana>
newHandler
- This handler gets the new events.elementName
- Element name.attributes
- Element attributes.
SyntaxException
- New Handler detected a semantic problem.public final int getLevel()
public final SAXParseException createSAXParseException(Exception e)
SAXParseException
including parsing position information.
e
- Exception to wrap.
public final SAXParseException createSAXParseException(String message)
SAXParseException
including parsing position information.
message
- Problem description.
public final void setUrl(URL url)
url
- This file is parsed.
|
Hilbert II - Version 0.03.01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
©left GNU General Public Licence All Rights Reserved. |