javax.xml.transform.sax
Class SAXSource
java.lang.Object
javax.xml.transform.sax.SAXSource
- Source
public class SAXSource
extends java.lang.Object
Acts as an holder for SAX-style Source.
FEATURE
public static final String FEATURE
SAXSource
public SAXSource()
Zero-argument default constructor. If this constructor
is used, and no other method is called, the
Transformer
assumes an empty input tree, with a default root node.
SAXSource
public SAXSource(InputSource inputSource)
inputSource
- An input source reference that must be non-null
and that will be passed to the parse method of the reader.
SAXSource
public SAXSource(XMLReader reader,
InputSource 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.
getInputSource
public InputSource getInputSource()
Get the SAX InputSource to be used for the Source.
- A valid InputSource reference, or null.
getSystemId
public String getSystemId()
Get the base ID (URI or system ID) from where URIs
will be resolved.
- getSystemId in interface Source
- Base URL for the Source, or null.
getXMLReader
public XMLReader getXMLReader()
Get the XMLReader to be used for the Source.
- A valid XMLReader or XMLFilter reference, or null.
setInputSource
public void setInputSource(InputSource inputSource)
Set the SAX InputSource to be used for the Source.
inputSource
- A valid InputSource reference.
setSystemId
public void setSystemId(String systemId)
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).
- setSystemId in interface Source
systemId
- The system identifier as a URI string.
setXMLReader
public void setXMLReader(XMLReader reader)
Set the XMLReader to be used for the Source.
reader
- A valid XMLReader or XMLFilter reference.
sourceToInputSource
public static InputSource sourceToInputSource(Source source)
Attempt to obtain a SAX InputSource object from a TrAX Source
object.
source
- Must be a non-null Source reference.
- An InputSource, or null if Source can not be converted.
Copyright B) 2004 Apache XML Project. All Rights Reserved.