|
Xerces 3.1.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.xml.parsers.SAXParser
Implementation instances of the SAXParser
abstract class
contain an implementation of the org.xml.sax.Parser
interface
and enables content from a variety of sources to be parsed using the
contained parser.
Instances of SAXParser
are obtained from a
SAXParserFactory
by invoking its newSAXParser()
method.
ATTENTION: THIS IMPLEMENTATION OF THE "JAVAX.XML.PARSER" CLASSES
IS NOT THE OFFICIAL REFERENCE IMPLEMENTATION OF THE JAVA SPECIFICATION
REQUEST 5 FOUND AT
http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html
THIS IMPLEMENTATION IS CONFORMANT TO THE "JAVA API FOR XML PARSING"
SPECIFICATION VERSION 1.0 PUBLIC RELEASE 1 BY JAMES DUNCAN DAVIDSON
PUBLISHED BY SUN MICROSYSTEMS ON FEB. 18, 2000 AND FOUND AT
http://java.sun.com/xml
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Constructor Summary | |
protected |
SAXParser()
Implementations should provide a protected constructor so that their factory implementation can instantiate instances of the implementation class. |
Method Summary | |
abstract Parser |
getParser()
Returns the underlying Parser object which is wrapped by
this SAXParser implementation. |
abstract boolean |
isNamespaceAware()
Returns whether or not this parser supports XML namespaces. |
abstract boolean |
isValidating()
Returns whether or not this parser supports validating XML content. |
void |
parse(java.io.File file,
HandlerBase base)
Parses the content of the given File as an XML document
using the specified HandlerBase object. |
void |
parse(InputSource source,
HandlerBase base)
Parses the content of the given InputSource as an XML
document using the specified HandlerBase object. |
void |
parse(java.io.InputStream stream,
HandlerBase base)
Parses the contents of the given InputStream as an XML
document using the specified HandlerBase object. |
void |
parse(java.lang.String uri,
HandlerBase base)
Parses the content of the given URI as an XML document using the specified HandlerBase object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected SAXParser()
SAXParserFactory
.Method Detail |
public void parse(java.io.InputStream stream, HandlerBase base) throws SAXException, java.io.IOException, java.lang.IllegalArgumentException
InputStream
as an XML
document using the specified HandlerBase
object.SAXException
- If there is a problem parsing the given XML
content.java.io.IOException
- If any IO errors occur reading the given
InputStream
.java.lang.IllegalArgumentException
- If the given
InputStream
is null.public void parse(java.lang.String uri, HandlerBase base) throws SAXException, java.io.IOException, java.lang.IllegalArgumentException
HandlerBase
object.SAXException
- If there is a problem parsing the given XML
content.java.io.IOException
- If any IO errors occur while reading content
located by the given URI.java.lang.IllegalArgumentException
- If the given URI is null.public void parse(java.io.File file, HandlerBase base) throws SAXException, java.io.IOException, java.lang.IllegalArgumentException
File
as an XML document
using the specified HandlerBase
object.SAXException
- If there is a problem parsing the given XML
content.java.io.IOException
- if any IO errors occur while reading content
from the given File
.java.lang.IllegalArgumentException
- if the given File
is
null.public void parse(InputSource source, HandlerBase base) throws SAXException, java.io.IOException, java.lang.IllegalArgumentException
InputSource
as an XML
document using the specified HandlerBase
object.SAXException
- If there is a problem parsing the given XML
content.java.io.IOException
- if any IO Errors occur while reading content
from the given InputSource
.java.lang.IllegalArgumentException
- if the given
InputSource
is null.public abstract Parser getParser() throws SAXException
Parser
object which is wrapped by
this SAXParser
implementation.SAXException
- If the initialization of the underlying parser
fails. NOTE: This Exception is specified on page
21 of the specification, but later on omissed in this
method documentation on page 23. Wich one is correct?public abstract boolean isNamespaceAware()
public abstract boolean isValidating()
|
Xerces 3.1.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |