|
Devsphere.com |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.xml.sax.helpers.DefaultHandler
|
+--com.devsphere.xml.saxdomix.SDXBuilder
|
+--com.devsphere.xml.taglib.support.builder.BuilderSupport
This helper class extends com.devsphere.xml.saxdomix.SDXBuilder
with methods for parsing an input source and logging parsing errors.
| Field Summary |
| Fields inherited from class com.devsphere.xml.saxdomix.SDXBuilder |
controller, handler, helper, inCDATA, lexicalHandler, newCDATA, stack, wantDOM |
| Constructor Summary | |
BuilderSupport(org.xml.sax.helpers.DefaultHandler handler,
SDXController controller,
AbstractLogger logger)
Initializes the builder |
|
| Method Summary | |
void |
error(org.xml.sax.SAXParseException e)
Logs a parse error. |
void |
fatalError(org.xml.sax.SAXParseException e)
Throws a fatal parse error. |
protected javax.xml.parsers.SAXParser |
getSAXParser(boolean validating)
Creates a SAX parser object. |
protected static javax.xml.parsers.SAXParserFactory |
getSAXParserFactory(boolean validating)
Creates a factory for SAX parsers. |
protected void |
log(java.lang.String message,
org.xml.sax.SAXParseException e)
Logs a SAX warning or error. |
void |
parse(org.xml.sax.InputSource source,
boolean validating)
Parses an input source using SAXDOMIX. |
void |
warning(org.xml.sax.SAXParseException e)
Logs a parse warning. |
| Methods inherited from class com.devsphere.xml.saxdomix.SDXBuilder |
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, processingInstruction, setDocumentLocator, startCDATA, startDocument, startDTD, startElement, startEntity |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endPrefixMapping, ignorableWhitespace, notationDecl, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BuilderSupport(org.xml.sax.helpers.DefaultHandler handler,
SDXController controller,
AbstractLogger logger)
handler - org.xml.sax.helpers.DefaultHandler
instance that will handle the SAX eventscontroller - com.devsphere.xml.saxdomix.SDXController
instance that will handle the DOM sub-trees and
control the switches between SAX and DOMlogger - com.devsphere.logging.AbstractLogger
instance that will be used to log the parsing
errors, if any| Method Detail |
public void parse(org.xml.sax.InputSource source,
boolean validating)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
this to its parse() method.
Therefore this builder object will act as SAX handler and
forward the SAX events or create DOM sub-trees as indicated
by the controller object.
source - the XML input source that must be parsedvalidating - a flag indicating if the XML content should be
validated by the XML parser
org.xml.sax.SAXException - to signal a SAX error
java.io.IOException - to signal an I/O error
javax.xml.parsers.ParserConfigurationException - to signal a configuration error
public void warning(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
warning in interface org.xml.sax.ErrorHandlerwarning in class org.xml.sax.helpers.DefaultHandlere - the SAX warning
org.xml.sax.SAXException - no exception is thrown
public void error(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
error in interface org.xml.sax.ErrorHandlererror in class org.xml.sax.helpers.DefaultHandlere - the SAX error
org.xml.sax.SAXException - no exception is thrown
public void fatalError(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
fatalError in interface org.xml.sax.ErrorHandlerfatalError in class org.xml.sax.helpers.DefaultHandlere - the SAX fatal error
org.xml.sax.SAXException - the SAX fatal error
protected void log(java.lang.String message,
org.xml.sax.SAXParseException e)
message - the message that must be loggede - the exception that must be logged
protected javax.xml.parsers.SAXParser getSAXParser(boolean validating)
throws org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
validating - flag indicating if validation should be performed
during the parsing of an XML source
org.xml.sax.SAXException - to signal a SAX error
javax.xml.parsers.ParserConfigurationException - to signal a configuration errorprotected static javax.xml.parsers.SAXParserFactory getSAXParserFactory(boolean validating)
validating - flag indicating if validation should be performed
during the parsing of an XML source
|
Devsphere.com |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||