|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.xml.parsers.SAXParser
Defines the API that wraps an org.xml.sax.Parser
implementation class. Using this class an application to parse
content using the SAX API.
An instance of this class can be obtained from the
SAXParserFactory.newSAXParser
method. Once an instance
of this class is obtained, XML can be parsed from a variety of
input sources. These input sources are InputStreams, Files, URLs,
and SAX InputSources.
As the content is parsed by the underlying parser, methods of the
given HandlerBase
are called.
Constructor Summary | |
protected |
SAXParser()
|
Method Summary | |
abstract Parser |
getParser()
Returns the SAX parser that is encapsultated by the implementation of this class. |
abstract boolean |
isNamespaceAware()
Indicates whether or not this parser is configured to understand namespaces. |
abstract boolean |
isValidating()
Indicates whether or not this parser is configured to validate XML documents. |
void |
parse(java.io.File f,
HandlerBase hb)
Parse the content of the file specified as XML using the specified org.xml.sax.HandlerBase . |
void |
parse(InputSource is,
HandlerBase hb)
Parse the content given org.xml.sax.InputSource
as XML using the specified
org.xml.sax.HandlerBase . |
void |
parse(java.io.InputStream is,
HandlerBase hb)
Parse the content of the given java.io.InputStream
instance as XML using the specified
org.xml.sax.HandlerBase . |
void |
parse(java.lang.String uri,
HandlerBase hb)
Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified org.xml.sax.HandlerBase . |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
protected SAXParser()
Method Detail |
public void parse(java.io.InputStream is, HandlerBase hb) throws SAXException, java.io.IOException
java.io.InputStream
instance as XML using the specified
org.xml.sax.HandlerBase
.is
- InputStream containing the content to be parsed.hb
- The SAX HandlerBase to use.DocumentHandler
public void parse(java.lang.String uri, HandlerBase hb) throws SAXException, java.io.IOException
org.xml.sax.HandlerBase
.uri
- The location of the content to be parsed.hb
- The SAX HandlerBase to use.DocumentHandler
public void parse(java.io.File f, HandlerBase hb) throws SAXException, java.io.IOException
org.xml.sax.HandlerBase
.f
- The file containing the XML to parsehb
- The SAX HandlerBase to use.DocumentHandler
public void parse(InputSource is, HandlerBase hb) throws SAXException, java.io.IOException
org.xml.sax.InputSource
as XML using the specified
org.xml.sax.HandlerBase
.is
- The InputSource containing the content to be parsed.hb
- The SAX HandlerBase to use.DocumentHandler
public abstract Parser getParser() throws SAXException
public abstract boolean isNamespaceAware()
public abstract boolean isValidating()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |