|
||||||||||
| 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 EntityResolverresolveEntity in class DefaultHandlerpubId - sysId -
SAXExceptionEntityResolver.resolveEntity(java.lang.String, java.lang.String)public void endDocument()
endDocument in interface ContentHandlerendDocument in class DefaultHandlerContentHandler.endDocument()public void startDocument()
startDocument in interface ContentHandlerstartDocument in class DefaultHandlerContentHandler.startDocument()
public void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlercharacters in class DefaultHandlerch - start - length -
SAXExceptionContentHandler.characters(char[], int, int)
public void endElement(String namespaceURI,
String localName,
String qName)
throws SAXException
endElement in interface ContentHandlerendElement in class DefaultHandlernamespaceURI - localName - qName -
SAXExceptionContentHandler.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 ContentHandlerstartElement in class DefaultHandlernamespaceURI - localName - qName - atts -
SAXExceptionContentHandler.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 ...
SAXExceptionDocumentHandler.getValue()public void error(SAXParseException exception)
error in interface ErrorHandlererror in class DefaultHandlerexception - ErrorHandler.error(org.xml.sax.SAXParseException)
public void fatalError(SAXParseException exception)
throws SAXException
fatalError in interface ErrorHandlerfatalError in class DefaultHandlerexception -
SAXExceptionErrorHandler.fatalError(org.xml.sax.SAXParseException)public void warning(SAXParseException exception)
warning in interface ErrorHandlerwarning in class DefaultHandlerexception - ErrorHandler.warning(org.xml.sax.SAXParseException)public void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandlersetDocumentLocator in class DefaultHandlerContentHandler.setDocumentLocator(org.xml.sax.Locator)public void endPrefixMapping(String prefix)
endPrefixMapping in interface ContentHandlerendPrefixMapping in class DefaultHandlerContentHandler.endPrefixMapping(java.lang.String)
public void startPrefixMapping(String prefix,
String uri)
startPrefixMapping in interface ContentHandlerstartPrefixMapping in class DefaultHandlerContentHandler.startPrefixMapping(java.lang.String,
java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||