Javax.xml.Parsers.SAXParser Class



Introduction

The javax.xml.Parsers.SAXParser class defines the API that wraps an XMLReader implementation class.

Class declaration

Following is the declaration for javax.xml.Parsers.SAXParser class −

public abstract class SAXParser
   extends Object

Class constructors

S.N. Constructor & Description
1 protected SAXParser()

This is the protected constructor to prevent instaniation.

Class methods

S.N. Method & Description
1 abstract Parser getParser()

This method returns the SAX parser that is encapsultated by the implementation of this class.

2 abstract Object getProperty(String name)

This method returns the particular property requested for in the underlying implementation of XMLReader.

3 Schema getSchema()

This method gets a reference to the the Schema being used by the XML processor.

4 abstract XMLReader getXMLReader()

This method returns the XMLReader that is encapsulated by the implementation of this class.

5 abstract boolean isNamespaceAware()

This method indicates whether or not this parser is configured to understand namespaces.

6 abstract boolean isValidating()

This method indicates whether or not this parser is configured to validate XML documents.

7 boolean isXIncludeAware()

This method gets the XInclude processing mode for this parser.

8 void parse(File f, DefaultHandler dh)

This method parse the content of the file specified as XML using the specified DefaultHandler.

9 void parse(File f, HandlerBase hb)

This method parse the content of the file specified as XML using the specified HandlerBase.

10 void parse(InputSource is, DefaultHandler dh)

This method parse the content given InputSource as XML using the specified DefaultHandler.

11 void parse(InputSource is, HandlerBase hb)

This method parse the content given InputSource as XML using the specified HandlerBase.

12 void parse(InputStream is, DefaultHandler dh)

This method parse the content of the given InputStream instance as XML using the specified DefaultHandler.

13 void parse(InputStream is, DefaultHandler dh, String systemId)

This method parse the content of the given InputStream instance as XML using the specified DefaultHandler.

14 void parse(InputStream is, HandlerBase hb)

This method parse the content of the given InputStream instance as XML using the specified HandlerBase.

15 void parse(InputStream is, HandlerBase hb, String systemId)

This method parse the content of the given InputStream instance as XML using the specified HandlerBase.

16 void parse(String uri, DefaultHandler dh)

This method parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified DefaultHandler.

17 void parse(String uri, HandlerBase hb)

This method parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified HandlerBase.

18 void reset()

This method reset this SAXParser to its original configuration.

19

abstract void setProperty(String name, Object value)

This method sets the particular property in the underlying implementation of XMLReader.

Methods inherited

This class inherits methods from the following classes −

java.lang.Object

Advertisements