public class TrAXFilter extends XMLFilterImpl
Constructor and Description |
---|
TrAXFilter(Templates templates)
Construct an empty XML filter, with no parent.
|
Modifier and Type | Method and Description |
---|---|
TransformerImpl |
getTransformer()
Return the Transformer object used for this XML filter.
|
void |
parse(InputSource input)
Parse a document.
|
void |
parse(String systemId)
Parse a document.
|
void |
setContentHandler(ContentHandler handler)
Set the content event handler.
|
void |
setErrorListener(ErrorListener handler) |
void |
setParent(XMLReader parent)
Set the parent reader.
|
characters, endDocument, endElement, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setProperty, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
public TrAXFilter(Templates templates) throws TransformerConfigurationException
This filter will have no parent: you must assign a parent before you start a parse or do any configuration with setFeature or setProperty.
public TransformerImpl getTransformer()
public void setParent(XMLReader parent)
This is the XMLReader
from which
this filter will obtain its events and to which it will pass its
configuration requests. The parent may itself be another filter.
If there is no parent reader set, any attempt to parse or to set or get a feature or property will fail.
setParent
in interface XMLFilter
setParent
in class XMLFilterImpl
parent
- The parent XML reader.NullPointerException
- If the parent is null.public void parse(InputSource input) throws SAXException, IOException
parse
in interface XMLReader
parse
in class XMLFilterImpl
input
- The input source for the document entity.SAXException
- Any SAX exception, possibly
wrapping another exception.IOException
- An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.XMLReader.parse(org.xml.sax.InputSource)
public void parse(String systemId) throws SAXException, IOException
parse
in interface XMLReader
parse
in class XMLFilterImpl
systemId
- The system identifier as a fully-qualified URI.SAXException
- Any SAX exception, possibly
wrapping another exception.IOException
- An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.XMLReader.parse(java.lang.String)
public void setContentHandler(ContentHandler handler)
setContentHandler
in interface XMLReader
setContentHandler
in class XMLFilterImpl
handler
- The new content handler.NullPointerException
- If the handler
is null.XMLReader.setContentHandler(org.xml.sax.ContentHandler)
public void setErrorListener(ErrorListener handler)
Copyright © 2021 JBoss by Red Hat. All rights reserved.