Name
SAXSource
Synopsis
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.SAXSource
public 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access