public abstract class SAXParser extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
SAXParser() |
| Modifier and Type | Method and Description |
|---|---|
abstract org.xml.sax.Parser |
getParser()
Returns the underlying SAX1 parser.
|
abstract java.lang.Object |
getProperty(java.lang.String name)
Returns the value of the specified SAX2 parser property.
|
javax.xml.validation.Schema |
getSchema()
Returns the schema in use by this parser.
|
abstract org.xml.sax.XMLReader |
getXMLReader()
Returns the underlying SAX2 parser.
|
abstract boolean |
isNamespaceAware()
Indicates whether this parser is XML Namespace aware.
|
abstract boolean |
isValidating()
Indicates whether this parser will validate its input.
|
boolean |
isXIncludeAware()
Indicates whether this parser is XInclude-aware.
|
void |
parse(java.io.File f,
org.xml.sax.helpers.DefaultHandler dh)
Parse the content of the specified file, reporting SAX2 events to the
given handler.
|
void |
parse(java.io.File f,
org.xml.sax.HandlerBase hb)
Parse the content of the specified file, reporting SAX1 events to the
given handler.
|
void |
parse(org.xml.sax.InputSource is,
org.xml.sax.helpers.DefaultHandler dh)
Parse the specified input source, reporting SAX2 events to the
given handler.
|
void |
parse(org.xml.sax.InputSource is,
org.xml.sax.HandlerBase hb)
Parse the specified input source, reporting SAX1 events to the
given handler.
|
void |
parse(java.io.InputStream is,
org.xml.sax.helpers.DefaultHandler dh)
Parse the specified input stream, reporting SAX2 events to the given
handler.
|
void |
parse(java.io.InputStream is,
org.xml.sax.helpers.DefaultHandler dh,
java.lang.String systemId)
Parse the specified input stream, reporting SAX2 events to the given
handler.
|
void |
parse(java.io.InputStream is,
org.xml.sax.HandlerBase hb)
Parse the specifed input stream, reporting SAX1 events to the given
handler.
|
void |
parse(java.io.InputStream is,
org.xml.sax.HandlerBase hb,
java.lang.String systemId)
Parse the specified input stream, reporting SAX1 events to the given
handler.
|
void |
parse(java.lang.String uri,
org.xml.sax.helpers.DefaultHandler dh)
Parse the content of the specified URI, reporting SAX2 events to the
given handler.
|
void |
parse(java.lang.String uri,
org.xml.sax.HandlerBase hb)
Parse the content of the specified URI, reporting SAX1 events to the
given handler.
|
void |
reset()
Resets this parser to its original configuration.
|
abstract void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets the specified SAX2 parser property.
|
protected SAXParser()
public void parse(java.io.InputStream is, org.xml.sax.HandlerBase hb) throws org.xml.sax.SAXException, java.io.IOException
is - an XML input streamhb - the SAX1 handlerjava.lang.IllegalArgumentException - if the input stream is nullorg.xml.sax.SAXExceptionjava.io.IOExceptionparse(java.io.InputStream,org.xml.sax.helpers.DefaultHandler)public void parse(java.io.InputStream is, org.xml.sax.HandlerBase hb, java.lang.String systemId) throws org.xml.sax.SAXException, java.io.IOException
is - an XML input streamhb - the SAX1 handlersystemId - the system ID of the XML documentjava.lang.IllegalArgumentException - if the input stream is nullorg.xml.sax.SAXExceptionjava.io.IOExceptionparse(java.io.InputStream,org.xml.sax.helpers.DefaultHandler,java.lang.String)public void parse(java.io.InputStream is, org.xml.sax.helpers.DefaultHandler dh) throws org.xml.sax.SAXException, java.io.IOException
is - an XML input streamdh - the SAX2 handlerjava.lang.IllegalArgumentException - if the input stream is nullorg.xml.sax.SAXExceptionjava.io.IOExceptionpublic void parse(java.io.InputStream is, org.xml.sax.helpers.DefaultHandler dh, java.lang.String systemId) throws org.xml.sax.SAXException, java.io.IOException
is - an XML input streamdh - the SAX2 handlersystemId - the system ID of the XML documentjava.lang.IllegalArgumentException - if the input stream is nullorg.xml.sax.SAXExceptionjava.io.IOExceptionpublic void parse(java.lang.String uri, org.xml.sax.HandlerBase hb) throws org.xml.sax.SAXException, java.io.IOException
uri - an XML system IDhb - the SAX1 handlerjava.lang.IllegalArgumentException - if the URI is nullorg.xml.sax.SAXExceptionjava.io.IOExceptionparse(java.lang.String,org.xml.sax.helpers.DefaultHandler)public void parse(java.lang.String uri, org.xml.sax.helpers.DefaultHandler dh) throws org.xml.sax.SAXException, java.io.IOException
uri - an XML system IDdh - the SAX2 handlerjava.lang.IllegalArgumentException - if the URI is nullorg.xml.sax.SAXExceptionjava.io.IOExceptionpublic void parse(java.io.File f, org.xml.sax.HandlerBase hb) throws org.xml.sax.SAXException, java.io.IOException
f - an XML filehb - the SAX1 handlerjava.lang.IllegalArgumentException - if the file is nullorg.xml.sax.SAXExceptionjava.io.IOExceptionparse(java.io.File,org.xml.sax.helpers.DefaultHandler)public void parse(java.io.File f, org.xml.sax.helpers.DefaultHandler dh) throws org.xml.sax.SAXException, java.io.IOException
f - an XML filedh - the SAX2 handlerjava.lang.IllegalArgumentException - if the file is nullorg.xml.sax.SAXExceptionjava.io.IOExceptionpublic void parse(org.xml.sax.InputSource is, org.xml.sax.HandlerBase hb) throws org.xml.sax.SAXException, java.io.IOException
is - the SAX input sourcehb - the SAX1 handlerjava.lang.IllegalArgumentException - if the input source is nullorg.xml.sax.SAXExceptionjava.io.IOExceptionparse(org.xml.sax.InputSource,org.xml.sax.helpers.DefaultHandler)public void parse(org.xml.sax.InputSource is, org.xml.sax.helpers.DefaultHandler dh) throws org.xml.sax.SAXException, java.io.IOException
is - an XML filedh - the SAX2 handlerjava.lang.IllegalArgumentException - if the input source is nullorg.xml.sax.SAXExceptionjava.io.IOExceptionpublic abstract org.xml.sax.Parser getParser() throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionpublic abstract org.xml.sax.XMLReader getXMLReader() throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionpublic abstract boolean isNamespaceAware()
public abstract boolean isValidating()
public abstract void setProperty(java.lang.String name, java.lang.Object value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
name - the name of the propertyvalue - the value of the propertyorg.xml.sax.SAXNotRecognizedExceptionorg.xml.sax.SAXNotSupportedExceptionpublic abstract java.lang.Object getProperty(java.lang.String name) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
name - the name of the propertyorg.xml.sax.SAXNotRecognizedExceptionorg.xml.sax.SAXNotSupportedExceptionpublic void reset()
public javax.xml.validation.Schema getSchema()
public boolean isXIncludeAware()