Google

: Class SAXSource


Class SAXSource


java.lang.Object

  |



Acts as an holder for SAX-style Source.



returns true when passed this value as an argument, the Transformer supports Source input of this type.
Field Summary
static java.lang.String
 
          Zero-argument default constructor.
          Create a SAXSource, using a SAX InputSource.
          Create a SAXSource, using an XMLReader and a SAX InputSource.
Constructor Summary
 
          Get the base ID (URI or system ID) from where URIs will be resolved.
          Set the SAX InputSource to be used for the Source.
          Set the system identifier for this Source.
          Set the XMLReader to be used for the Source.
Method Summary

          Get the SAX InputSource to be used for the Source.
 java.lang.String

          Get the XMLReader to be used for the Source.
 void
 void
 void

          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
 

Field Detail

FEATURE


public static final java.lang.String FEATURE
returns true when passed this value as an argument, the Transformer supports Source input of this type.
Constructor Detail

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


Create a SAXSource, using an XMLReader and a SAX InputSource. The Transformer or SAXTransformerFactory will set itself to be the reader's ContentHandler, and then will call reader.parse(inputSource).
Parameters:
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.

SAXSource


Create a SAXSource, using a SAX InputSource. The Transformer or SAXTransformerFactory creates a (if setXMLReader is not used), sets itself as the reader's ContentHandler, and calls reader.parse(inputSource).
Parameters:
inputSource - An input source reference that must be non-null and that will be passed to the parse method of the reader.
Method Detail
setXMLReader


Set the XMLReader to be used for the Source.
Parameters:
reader - A valid XMLReader or XMLFilter reference.

getXMLReader



Get the XMLReader to be used for the Source.
Returns:
A valid XMLReader or XMLFilter reference, or null.

setInputSource


Set the SAX InputSource to be used for the Source.
Parameters:
inputSource - A valid InputSource reference.

getInputSource



Get the SAX InputSource to be used for the Source.
Returns:
A valid InputSource reference, or null.

setSystemId


public void setSystemId(java.lang.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).

Parameters:
systemId - The system identifier as a URI string.

getSystemId


public java.lang.String getSystemId()
Get the base ID (URI or system ID) from where URIs will be resolved.
Returns:
Base URL for the Source, or null.

sourceToInputSource


Attempt to obtain a SAX InputSource object from a TrAX Source object.
Parameters:
source - Must be a non-null Source reference.
Returns:
An InputSource, or null if Source can not be converted.