java.lang.Object | +--javax.xml.transform.sax.SAXSource
Acts as an holder for SAX-style Source.
FEATURE If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument, the Transformer supports Source input of this type. |
SAXSource() Zero-argument default constructor. | |
SAXSource(InputSource inputSource) Create a SAXSource , using a SAXInputSource . | |
SAXSource(XMLReader reader,InputSource inputSource) Create a SAXSource , using anXMLReader and a SAX InputSource. |
getInputSource() Get the SAX InputSource to be used for the Source. | |
getSystemId() Get the base ID (URI or system ID) from where URIs will be resolved. | |
getXMLReader() Get the XMLReader to be used for the Source. | |
setInputSource(InputSource inputSource) Set the SAX InputSource to be used for the Source. | |
setSystemId(java.lang.String systemId) Set the system identifier for this Source. | |
setXMLReader(XMLReader reader) Set the XMLReader to be used for the Source. | |
sourceToInputSource(Source source) Attempt to obtain a SAX InputSource object from a TrAX Source object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
public static final java.lang.StringFEATURE
TransformerFactory.getFeature(java.lang.String)
returns true when passed this value as an argument, the Transformer supports Source input of this type.publicSAXSource()
Transformer
assumes an empty input tree, with a default root node.publicSAXSource(XMLReader reader,InputSource inputSource)
SAXSource
, using anXMLReader
and a SAX InputSource. TheTransformer
orSAXTransformerFactory
will set itself to be the reader'sContentHandler
, and then will call reader.parse(inputSource).reader
- An XMLReader to be used for the parse.inputSource
- A SAX input source reference that must be non-null and that will be passed to the reader parse method.publicSAXSource(InputSource inputSource)
SAXSource
, using a SAXInputSource
. TheTransformer
orSAXTransformerFactory
creates a reader viaXMLReaderFactory
(if setXMLReader is not used), sets itself as the reader'sContentHandler
, and calls reader.parse(inputSource).inputSource
- An input source reference that must be non-null and that will be passed to the parse method of the reader.public voidsetXMLReader(XMLReader reader)
reader
- A valid XMLReader or XMLFilter reference.publicXMLReadergetXMLReader()
public voidsetInputSource(InputSource inputSource)
inputSource
- A valid InputSource reference.publicInputSourcegetInputSource()
public voidsetSystemId(java.lang.String systemId)
The system identifier is optional if there is a byte stream or a character stream, but it is still useful to provide one, since the application can use it to resolve relative URIs and can include it in error messages and warnings (the parser will attempt to open a connection to the URI only if no byte stream or character stream is specified).
setSystemId
in interfaceSource
systemId
- The system identifier as a URI string.public java.lang.StringgetSystemId()
getSystemId
in interfaceSource
public staticInputSourcesourceToInputSource(Source source)
source
- Must be a non-null Source reference.