|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLogEnabled | +--org.apache.excalibur.xml.impl.JaxpParser
An XMLParser that is only dependant on JAXP 1.1 compliant parsers. The configuration can contain the following parameters :
false
) : should the parser
validate parsed documents ?
false
) : do we want
namespaces declarations also as 'xmlns:' attributes ?true
confuses some XSL
processors (e.g. Saxon).
true
) : should the parser
stop parsing if a warning occurs ?
true
) : should the parser
stop parsing if a recoverable error occurs ?
true
) : do we want to reuse
parsers or create a new parser for each parse ?true
, parsers are not
recycled in case of parsing errors : some parsers (e.g. Xerces) don't like
to be reused after failure.
SAXParserFactory
implementation class to be used instead of using the standard JAXP mechanism
(SAXParserFactory.newInstance()
). This allows to choose
unambiguously the JAXP implementation to be used when several of them are
available in the classpath.
Field Summary |
Fields inherited from interface org.apache.excalibur.xml.sax.SAXParser |
ROLE |
Fields inherited from interface org.apache.excalibur.xml.dom.DOMParser |
ROLE |
Constructor Summary | |
JaxpParser()
|
Method Summary | |
Document |
createDocument()
Return a new Document . |
void |
dispose()
|
void |
error(SAXParseException spe)
Receive notification of a recoverable error. |
void |
fatalError(SAXParseException spe)
Receive notification of a fatal error. |
void |
parameterize(Parameters params)
|
void |
parse(InputSource in,
ContentHandler consumer)
Parse the InputSource and send
SAX events to the consumer.
|
void |
parse(InputSource in,
ContentHandler contentHandler,
LexicalHandler lexicalHandler)
Parse the InputSource and send
SAX events to the consumer.
|
Document |
parseDocument(InputSource input)
Parses a new Document object from the given InputSource. |
void |
service(ServiceManager manager)
Get the Entity Resolver from the component m_manager |
void |
warning(SAXParseException spe)
Receive notification of a warning. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JaxpParser()
Method Detail |
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void dispose()
dispose
in interface Disposable
public void parameterize(Parameters params) throws ParameterException
parameterize
in interface Parameterizable
ParameterException
public void parse(InputSource in, ContentHandler contentHandler, LexicalHandler lexicalHandler) throws SAXException, IOException
InputSource
and send
SAX events to the consumer.
Attention: the consumer can implement the
LexicalHandler
as well.
The parse should take care of this.
parse
in interface SAXParser
SAXException
IOException
public void parse(InputSource in, ContentHandler consumer) throws SAXException, IOException
InputSource
and send
SAX events to the consumer.
Attention: the consumer can implement the
LexicalHandler
as well.
The parse should take care of this.
parse
in interface SAXParser
SAXException
IOException
public Document parseDocument(InputSource input) throws SAXException, IOException
parseDocument
in interface DOMParser
SAXException
IOException
public Document createDocument() throws SAXException
Document
.
createDocument
in interface DOMParser
SAXException
public void error(SAXParseException spe) throws SAXException
error
in interface ErrorHandler
SAXException
public void fatalError(SAXParseException spe) throws SAXException
fatalError
in interface ErrorHandler
SAXException
public void warning(SAXParseException spe) throws SAXException
warning
in interface ErrorHandler
SAXException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |