This class is a Source implementation that describes a document represented as a series of SAX event method calls. A SAXSource requires an org.xml.sax.InputSource object that describes the stream to parse, and may optionally specify the org.xml.sax.XMLReader or org.xml.sax.XMLFilter that generates the SAX events. (If no XMLReader or XMLFilter is specified, then the transformer object will a default XMLReader .) Note that since an InputSource is required, a SAXSource does not behave significantly differently than a StreamSource unless an XMLFilter is used. SAXSource also has one static method, sourceToInputSource( ) which returns a SAX InputSource method derived from the specified Source object, or null if the specified Source cannot be converted to an InputSource . Figure 20-12. javax.xml.transform.sax.SAXSourcepublic class SAXSource implements javax.xml.transform.Source { // Public Constructors public SAXSource ( ); public SAXSource (org.xml.sax.InputSource inputSource ); public SAXSource (org.xml.sax.XMLReader reader , org.xml.sax.InputSource inputSource ); // Public Constants public static final String FEATURE ; ="http://javax.xml.transform.sax.SAXSource/feature" // Public Class Methods public static org.xml.sax.InputSource sourceToInputSource (javax.xml.transform.Source source ); // Public Instance Methods public org.xml.sax.InputSource getInputSource ( ); default:null public org.xml.sax.XMLReader getXMLReader ( ); default:null public void setInputSource (org.xml.sax.InputSource inputSource ); public void setXMLReader (org.xml.sax.XMLReader reader ); // Methods Implementing Source public String getSystemId ( ); default:null public void setSystemId (String systemId ); } |