SAXSource
open class SAXSource : Source
kotlin.Any | |
↳ | javax.xml.transform.sax.SAXSource |
Acts as an holder for SAX-style Source.
Note that XSLT requires namespace support. Attempting to transform an input source that is not generated with a namespace-aware parser may result in errors. Parsers can be made namespace aware by calling the javax.xml.parsers.SAXParserFactory#setNamespaceAware(boolean awareness)
method.
Summary
Constants | |
---|---|
static String |
If |
Public constructors | |
---|---|
Zero-argument default constructor. |
|
SAXSource(inputSource: InputSource!) Create a |
|
SAXSource(reader: XMLReader!, inputSource: InputSource!) Create a |
Public methods | |
---|---|
open InputSource! |
Get the SAX InputSource to be used for the Source. |
open String! |
Get the base ID (URI or system ID) from where URIs will be resolved. |
open XMLReader! |
Get the XMLReader to be used for the Source. |
open Unit |
setInputSource(inputSource: InputSource!) Set the SAX InputSource to be used for the Source. |
open Unit |
setSystemId(systemId: String!) Set the system identifier for this Source. |
open Unit |
setXMLReader(reader: XMLReader!) Set the XMLReader to be used for the Source. |
open static InputSource! |
sourceToInputSource(source: Source!) Attempt to obtain a SAX InputSource object from a Source object. |
Constants
FEATURE
static val FEATURE: String
If javax.xml.transform.TransformerFactory#getFeature
returns true when passed this value as an argument, the Transformer supports Source input of this type.
Value: "http://javax.xml.transform.sax.SAXSource/feature"
Public constructors
SAXSource
SAXSource()
Zero-argument default constructor. If this constructor is used, and no SAX source is set using setInputSource(org.xml.sax.InputSource)
, then the Transformer
will create an empty source org.xml.sax.InputSource
using new InputSource()
.
See Also
SAXSource
SAXSource(inputSource: InputSource!)
Create a SAXSource
, using a SAX InputSource
. The javax.xml.transform.Transformer
or javax.xml.transform.sax.SAXTransformerFactory
creates a reader via org.xml.sax.helpers.XMLReaderFactory
(if setXMLReader is not used), sets itself as the reader's org.xml.sax.ContentHandler
, and calls reader.parse(inputSource).
Parameters | |
---|---|
inputSource |
InputSource!: An input source reference that must be non-null and that will be passed to the parse method of the reader. |
SAXSource
SAXSource(
reader: XMLReader!,
inputSource: InputSource!)
Create a SAXSource
, using an org.xml.sax.XMLReader
and a SAX InputSource. The javax.xml.transform.Transformer
or javax.xml.transform.sax.SAXTransformerFactory
will set itself to be the reader's org.xml.sax.ContentHandler
, and then will call reader.parse(inputSource).
Parameters | |
---|---|
reader |
XMLReader!: An XMLReader to be used for the parse. |
inputSource |
InputSource!: A SAX input source reference that must be non-null and that will be passed to the reader parse method. |
Public methods
getInputSource
open fun getInputSource(): InputSource!
Get the SAX InputSource to be used for the Source.
Return | |
---|---|
InputSource! |
A valid InputSource reference, or null. |
getSystemId
open fun getSystemId(): String!
Get the base ID (URI or system ID) from where URIs will be resolved.
Return | |
---|---|
String! |
Base URL for the Source , or null . |
getXMLReader
open fun getXMLReader(): XMLReader!
Get the XMLReader to be used for the Source.
Return | |
---|---|
XMLReader! |
A valid XMLReader or XMLFilter reference, or null. |
setInputSource
open fun setInputSource(inputSource: InputSource!): Unit
Set the SAX InputSource to be used for the Source.
Parameters | |
---|---|
inputSource |
InputSource!: A valid InputSource reference. |
setSystemId
open fun setSystemId(systemId: String!): Unit
Set the system identifier for this Source. If an input source has already been set, it will set the system ID or that input source, otherwise it will create a new input source.
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).
Parameters | |
---|---|
systemId |
String!: The system identifier as a URI string. |
setXMLReader
open fun setXMLReader(reader: XMLReader!): Unit
Set the XMLReader to be used for the Source.
Parameters | |
---|---|
reader |
XMLReader!: A valid XMLReader or XMLFilter reference. |
sourceToInputSource
open static fun sourceToInputSource(source: Source!): InputSource!
Attempt to obtain a SAX InputSource object from a Source object.
Parameters | |
---|---|
source |
Source!: Must be a non-null Source reference. |
Return | |
---|---|
InputSource! |
An InputSource, or null if Source can not be converted. |