javax.xml.parsers
public
abstract
class
javax.xml.parsers.SAXParser
Provides a wrapper around a SAX XMLReader. This abstract class only defines
the interface, whereas the SAXParserFactory class is used to obtain instances
of concrete subclasses.
Summary
Protected Constructors
Public Methods
abstract |
|
|
|
|
Parser |
getParser() |
abstract |
|
|
|
|
Object |
getProperty(String name) |
abstract |
|
|
|
|
XMLReader |
getXMLReader() |
abstract |
|
|
|
|
boolean |
isNamespaceAware() |
abstract |
|
|
|
|
boolean |
isValidating() |
|
|
|
|
|
boolean |
isXIncludeAware() |
|
|
|
|
|
void |
parse(InputStream stream, DefaultHandler handler) |
|
|
|
|
|
void |
parse(InputStream stream, HandlerBase handler) |
|
|
|
|
|
void |
parse(String uri, HandlerBase handler) |
|
|
|
|
|
void |
parse(InputStream stream, DefaultHandler handler, String systemId) |
|
|
|
|
|
void |
parse(InputStream stream, HandlerBase handler, String systemId) |
|
|
|
|
|
void |
parse(InputSource source, DefaultHandler handler) |
|
|
|
|
|
void |
parse(InputSource source, HandlerBase handler) |
|
|
|
|
|
void |
parse(String uri, DefaultHandler handler) |
|
|
|
|
|
void |
parse(File file, DefaultHandler handler) |
|
|
|
|
|
void |
parse(File file, HandlerBase handler) |
|
|
|
|
|
void |
reset() |
abstract |
|
|
|
|
void |
setProperty(String name, Object value) |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Protected Constructors
protected
SAXParser()
Do-nothing constructor. Prevents instantiation. To be overridden by
concrete subclasses.
Public Methods
public
abstract
Parser
getParser()
Queries the underlying SAX Parser object.
public
abstract
Object
getProperty(String name)
Queries a property of the underlying SAX XMLReader.
Parameters
name
| The name of the property. |
Returns
- The value of the property.
public
abstract
XMLReader
getXMLReader()
Queries the underlying SAX XMLReader object.
public
abstract
boolean
isNamespaceAware()
Reflects whether this SAXParser is namespace-aware.
Returns
- true if the SAXParser is namespace-aware, or false otherwise.
public
abstract
boolean
isValidating()
Reflects whether this SAXParser is validating.
Returns
- true if the SAXParser is validating, or false otherwise.
public
boolean
isXIncludeAware()
Reflects whether this SAXParser is XInclude-aware.
Returns
- true if the SAXParser is XInclude-aware, or false otherwise.
Parses the given XML InputStream using the given SAX event handler.
Parameters
stream
| The InputStream. |
handler
| The SAX handler. |
Parses the given XML InputStream using the given SAX event handler.
Parameters
stream
| The InputStream. |
handler
| The SAX handler. |
Parses the contents of the given URI using the given SAX event handler.
Parameters
uri
| The URI. |
handler
| The SAX handler. |
Parses the given XML InputStream using the given SAX event handler and
system ID.
Parameters
stream
| The InputStream. |
handler
| The SAX handler. |
systemId
| The system ID. |
Parses the given XML InputStream using the given SAX event handler and
system ID.
Parameters
stream
| The InputStream. |
handler
| The SAX handler. |
systemId
| The system ID. |
Parses the given SAX InputSource using the given SAX event handler.
Parameters
source
| The SAX HandlerBase. |
handler
| The SAX handler. |
Parses the given SAX InputSource using the given SAX event handler.
Parameters
source
| The SAX InputSource. |
handler
| The SAX handler. |
Parses the contents of the given URI using the given SAX event handler.
Parameters
uri
| The URI. |
handler
| The SAX handler. |
Parses the given XML file using the given SAX event handler.
Parameters
file
| The file. |
handler
| The SAX handler. |
public
void
parse(File file, HandlerBase handler)
Parses the given XML file using the given SAX event handler.
Parameters
file
| The file. |
handler
| The SAX handler. |
public
void
reset()
Resets the DocumentBuilder to the same state is was in after its
creation.
public
abstract
void
setProperty(String name, Object value)
Sets a property of the underlying SAX XMLReader.
Parameters
name
| The name of the property. |
value
| The value of the property. |