|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.xml.parsers.SAXParser
Builder for SAX parsers
Normally, users will create a SAX parser as follows:
SAXParserFactory factory = SAXParserFactory.newInstance();
Parser parser = factory.newSAXParser();
parser.setDocumentHandler(myDocumentHandler);
parser.parse(myInputSource);
Constructor Summary | |
SAXParser()
|
Method Summary | |
abstract org.xml.sax.Parser |
getParser()
Returns the SAX parser |
abstract java.lang.Object |
getProperty(java.lang.String name)
Returns a property from the underlying XMLReader |
abstract org.xml.sax.XMLReader |
getXMLReader()
Returns the encapsulated reader. |
abstract boolean |
isNamespaceAware()
Returns true if the parser is namespace-aware |
abstract boolean |
isValidating()
Returns true if the parser is validating |
void |
parse(java.io.File file,
org.xml.sax.helpers.DefaultHandler handler)
Parse given a File |
void |
parse(java.io.File file,
org.xml.sax.HandlerBase base)
Parse a given file using base as the callback. |
void |
parse(org.xml.sax.InputSource source,
org.xml.sax.helpers.DefaultHandler handler)
Parse given an input source. |
void |
parse(org.xml.sax.InputSource source,
org.xml.sax.HandlerBase base)
Parse given an input source |
void |
parse(java.io.InputStream stream,
org.xml.sax.helpers.DefaultHandler handler)
Parse the given input stream using handler as the callback. |
void |
parse(java.io.InputStream stream,
org.xml.sax.helpers.DefaultHandler handler,
java.lang.String systemId)
Parse the given input stream using handler as the callback
and systemId to resolve relative paths. |
void |
parse(java.io.InputStream stream,
org.xml.sax.HandlerBase base)
Parse the given input stream using base as the callback. |
void |
parse(java.io.InputStream stream,
org.xml.sax.HandlerBase base,
java.lang.String systemId)
Parse the given input stream using base as the callback
and systemId to resolve relative paths. |
void |
parse(java.lang.String uri,
org.xml.sax.helpers.DefaultHandler handler)
Parse given a path name using handler as the callback. |
void |
parse(java.lang.String uri,
org.xml.sax.HandlerBase base)
Parse given a path name. |
abstract void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets a property for the underlying XMLReader |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SAXParser()
Method Detail |
public abstract org.xml.sax.Parser getParser() throws org.xml.sax.SAXException
public abstract java.lang.Object getProperty(java.lang.String name) throws org.xml.sax.SAXNotRecognizedException
name
- the name of the propertypublic abstract void setProperty(java.lang.String name, java.lang.Object value) throws org.xml.sax.SAXNotRecognizedException
name
- the name of the propertyobject
- the new valuepublic abstract org.xml.sax.XMLReader getXMLReader() throws org.xml.sax.SAXException
public abstract boolean isNamespaceAware()
public abstract boolean isValidating()
public void parse(java.io.File file, org.xml.sax.helpers.DefaultHandler handler) throws org.xml.sax.SAXException, java.io.IOException
file
- a path to the file to openhandler
- the SAX handler base to receive eventspublic void parse(java.io.File file, org.xml.sax.HandlerBase base) throws org.xml.sax.SAXException, java.io.IOException
base
as the callback.
Applications should use the DefaultHandler version instead.
file
- a path to the file to openbase
- the SAX handler to receive eventspublic void parse(java.io.InputStream stream, org.xml.sax.helpers.DefaultHandler handler) throws org.xml.sax.SAXException, java.io.IOException
handler
as the callback.stream
- the input stream to be used as a sourcehandler
- the SAX handler to receive eventspublic void parse(java.io.InputStream stream, org.xml.sax.HandlerBase base) throws org.xml.sax.SAXException, java.io.IOException
base
as the callback.
Applications should use the DefaultHandler version instead.
stream
- the input stream to be used as a sourcebase
- the SAX handler base to receive eventspublic void parse(java.io.InputStream stream, org.xml.sax.helpers.DefaultHandler handler, java.lang.String systemId) throws org.xml.sax.SAXException, java.lang.IllegalArgumentException, java.io.IOException
handler
as the callback
and systemId to resolve relative paths.stream
- the input stream to be used as a sourcehandler
- the SAX handler to receive eventssystemId
- url for resolving relative paths.public void parse(java.io.InputStream stream, org.xml.sax.HandlerBase base, java.lang.String systemId) throws org.xml.sax.SAXException, java.lang.IllegalArgumentException, java.io.IOException
base
as the callback
and systemId
to resolve relative paths.
Applications should use the DefaultHandler version instead.
stream
- the input stream to be used as a sourcebase
- the SAX handler base to receive eventssystemId
- url for resolving relative paths.public void parse(java.lang.String uri, org.xml.sax.helpers.DefaultHandler handler) throws org.xml.sax.SAXException, java.io.IOException
handler
as the callback.uri
- a path to the file to openhandler
- the SAX handler to receive eventspublic void parse(java.lang.String uri, org.xml.sax.HandlerBase base) throws org.xml.sax.SAXException, java.io.IOException
Applications should use the DefaultHandler version instead.
uri
- a path to the file to openbase
- the SAX handler to receive eventspublic void parse(org.xml.sax.InputSource source, org.xml.sax.helpers.DefaultHandler handler) throws org.xml.sax.SAXException, java.io.IOException
source
- a SAX input sourcehandler
- the SAX handler to receive eventspublic void parse(org.xml.sax.InputSource source, org.xml.sax.HandlerBase base) throws org.xml.sax.SAXException, java.io.IOException
source
- a SAX input sourcebase
- the SAX handler base to receive events
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |