|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectDefaultHandler
XMLSAXHandler
public class XMLSAXHandler
This is a schema content handler. Code here has been modified from code written by Ian Schneider.
This class contains one stack used to store part of the parse tree. The ElementHandlers found on the stack have direct next handlers placed on the stack. So here's the warning, be careful to read how you may be affecting (or forgetting to affect) the stack.
If a FlowHandler implementation is available in the hints, the handler will periodically check it to see if it should stop parsing. See the FlowHandler interface.
XMLElementHandler
Field Summary | |
---|---|
protected static Level |
level
|
protected static Logger |
logger
the logger -- should be used for debugging (assuming there are bugs LOL) |
Constructor Summary | |
---|---|
XMLSAXHandler(Map hints)
This contructor is intended to create an XMLSAXHandler to be used when parsing an XML instance document. |
|
XMLSAXHandler(URI intendedDocument,
Map hints)
This contructor is intended to create an XMLSAXHandler to be used when parsing an XML instance document. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
Implementation of characters. |
void |
endDocument()
Implementation of endDocument. |
void |
endElement(String namespaceURI,
String localName,
String qName)
Implementation of endElement. |
void |
endPrefixMapping(String prefix)
|
void |
error(SAXParseException exception)
Implementation of error. |
void |
fatalError(SAXParseException exception)
Implementation of fatalError. |
Object |
getDocument()
getDocument purpose. |
InputSource |
resolveEntity(String pubId,
String sysId)
TODO summary sentence for resolveEntity ... |
void |
setDocumentLocator(Locator locator)
Stores the locator for future error reporting |
static void |
setLogLevel(Level l)
Used to set the logger level for all XMLSAXHandlers |
void |
startDocument()
Implementation of startDocument. |
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
Implementation of startElement. |
void |
startPrefixMapping(String prefix,
String uri)
|
void |
warning(SAXParseException exception)
Implementation of warning. |
Methods inherited from class DefaultHandler |
---|
ignorableWhitespace, notationDecl, processingInstruction, skippedEntity, unparsedEntityDecl |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Logger logger
protected static Level level
Constructor Detail |
---|
public XMLSAXHandler(URI intendedDocument, Map hints)
This contructor is intended to create an XMLSAXHandler to be used when parsing an XML instance document. The instance document's uri is also be provided, as this will allow the parser to resolve relative uri's.
intendedDocument
- hints
- DOCUMENT ME!public XMLSAXHandler(Map hints)
This contructor is intended to create an XMLSAXHandler to be used when parsing an XML instance document. The instance document's uri is also be provided, as this will allow the parser to resolve relative uri's.
hints
- DOCUMENT ME!Method Detail |
---|
public InputSource resolveEntity(String pubId, String sysId) throws SAXException
resolveEntity
in interface EntityResolver
resolveEntity
in class DefaultHandler
pubId
- sysId
-
SAXException
EntityResolver.resolveEntity(java.lang.String, java.lang.String)
public void endDocument()
endDocument
in interface ContentHandler
endDocument
in class DefaultHandler
ContentHandler.endDocument()
public void startDocument()
startDocument
in interface ContentHandler
startDocument
in class DefaultHandler
ContentHandler.startDocument()
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class DefaultHandler
ch
- start
- length
-
SAXException
ContentHandler.characters(char[], int, int)
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class DefaultHandler
namespaceURI
- localName
- qName
-
SAXException
ContentHandler.endElement(java.lang.String,
java.lang.String, java.lang.String)
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
startElement
in class DefaultHandler
namespaceURI
- localName
- qName
- atts
-
SAXException
ContentHandler.startElement(java.lang.String,
java.lang.String, java.lang.String, org.xml.sax.Attributes)
public static void setLogLevel(Level l)
Used to set the logger level for all XMLSAXHandlers
l
- public Object getDocument() throws SAXException
Completes the post-processing phase, and returns the value from the parse ...
SAXException
DocumentHandler.getValue()
public void error(SAXParseException exception)
error
in interface ErrorHandler
error
in class DefaultHandler
exception
- ErrorHandler.error(org.xml.sax.SAXParseException)
public void fatalError(SAXParseException exception) throws SAXException
fatalError
in interface ErrorHandler
fatalError
in class DefaultHandler
exception
-
SAXException
ErrorHandler.fatalError(org.xml.sax.SAXParseException)
public void warning(SAXParseException exception)
warning
in interface ErrorHandler
warning
in class DefaultHandler
exception
- ErrorHandler.warning(org.xml.sax.SAXParseException)
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
setDocumentLocator
in class DefaultHandler
ContentHandler.setDocumentLocator(org.xml.sax.Locator)
public void endPrefixMapping(String prefix)
endPrefixMapping
in interface ContentHandler
endPrefixMapping
in class DefaultHandler
ContentHandler.endPrefixMapping(java.lang.String)
public void startPrefixMapping(String prefix, String uri)
startPrefixMapping
in interface ContentHandler
startPrefixMapping
in class DefaultHandler
ContentHandler.startPrefixMapping(java.lang.String,
java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |