Methods Summary |
---|
public abstract org.xml.sax.Parser | getParser()Queries the underlying SAX {@link Parser} object.
|
public abstract java.lang.Object | getProperty(java.lang.String name)Queries a property of the underlying SAX {@link XMLReader}.
|
public abstract org.xml.sax.XMLReader | getXMLReader()Queries the underlying SAX XMLReader object.
|
public abstract boolean | isNamespaceAware()Reflects whether this {@code SAXParser} is namespace-aware.
|
public abstract boolean | isValidating()Reflects whether this {@code SAXParser} is validating.
|
public boolean | isXIncludeAware()Reflects whether this {@code SAXParser} is XInclude-aware.
throw new UnsupportedOperationException();
|
public void | parse(java.io.InputStream stream, org.xml.sax.HandlerBase handler)Parses the given XML InputStream using the given SAX event handler.
if (stream == null) {
throw new IllegalArgumentException("stream must not be null");
}
parse(new InputSource(stream), handler);
|
public void | parse(java.io.InputStream stream, org.xml.sax.HandlerBase handler, java.lang.String systemId)Parses the given XML InputStream using the given SAX event handler and
system ID.
if (stream == null) {
throw new IllegalArgumentException("stream must not be null");
}
InputSource source = new InputSource(stream);
if (systemId != null) {
source.setSystemId(systemId);
}
parse(source, handler);
|
public void | parse(java.io.InputStream stream, org.xml.sax.helpers.DefaultHandler handler)Parses the given XML InputStream using the given SAX event handler.
parse(new InputSource(stream), handler);
|
public void | parse(java.io.InputStream stream, org.xml.sax.helpers.DefaultHandler handler, java.lang.String systemId)Parses the given XML InputStream using the given SAX event handler and
system ID.
if (stream == null) {
throw new IllegalArgumentException("stream must not be null");
}
InputSource source = new InputSource(stream);
if (systemId != null) {
source.setSystemId(systemId);
}
parse(source, handler);
|
public void | parse(java.lang.String uri, org.xml.sax.HandlerBase handler)Parses the contents of the given URI using the given SAX event handler.
if (uri == null) {
throw new IllegalArgumentException("uri must not be null");
}
parse(new InputSource(uri), handler);
|
public void | parse(java.lang.String uri, org.xml.sax.helpers.DefaultHandler handler)Parses the contents of the given URI using the given SAX event handler.
if (uri == null) {
throw new IllegalArgumentException("uri must not be null");
}
parse(new InputSource(uri), handler);
|
public void | parse(org.xml.sax.InputSource source, org.xml.sax.HandlerBase handler)Parses the given SAX {@link InputSource} using the given SAX event
handler.
Parser parser = getParser();
if (source == null) {
throw new IllegalArgumentException("source must not be null");
}
if (handler != null) {
parser.setDocumentHandler(handler);
parser.setDTDHandler(handler);
parser.setEntityResolver(handler);
parser.setErrorHandler(handler);
}
parser.parse(source);
|
public void | parse(org.xml.sax.InputSource source, org.xml.sax.helpers.DefaultHandler handler)Parses the given SAX {@link InputSource} using the given SAX event
handler.
if (source == null) {
throw new IllegalArgumentException("source must not be null");
}
XMLReader reader = getXMLReader();
if (handler != null) {
reader.setContentHandler(handler);
reader.setDTDHandler(handler);
reader.setEntityResolver(handler);
reader.setErrorHandler(handler);
}
reader.parse(source);
|
public void | parse(java.io.File file, org.xml.sax.HandlerBase handler)Parses the given XML file using the given SAX event handler.
if (file == null) {
throw new IllegalArgumentException("file must not be null");
}
if (file.isDirectory()) {
throw new IllegalArgumentException("file must not be a directory");
}
InputSource source = new InputSource("file:" + file.getAbsolutePath());
parse(source, handler);
|
public void | parse(java.io.File file, org.xml.sax.helpers.DefaultHandler handler)Parses the given XML file using the given SAX event handler.
if (file == null) {
throw new IllegalArgumentException("file must not be null");
}
if (file.isDirectory()) {
throw new IllegalArgumentException("file must not be a directory");
}
InputSource source = new InputSource("file:" + file.getAbsolutePath());
parse(source, handler);
|
public void | reset()Resets the {@code SAXParser} to the same state is was in after its
creation.
// Do nothing.
|
public abstract void | setProperty(java.lang.String name, java.lang.Object value)Sets a property of the underlying SAX {@link XMLReader}.
|