Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
javax.xml.parsers.SAXParser
public abstract class SAXParser
extends java.lang.Object
Constructor Summary | |
Method Summary | |
Parser |
|
Object |
|
Schema |
|
XMLReader |
|
boolean |
|
boolean |
|
boolean |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException
Returns the value of the specified SAX2 parser property.
- Parameters:
name
- the name of the property
public XMLReader getXMLReader() throws SAXException
Returns the underlying SAX2 parser.
- Since:
- 1.1
public boolean isNamespaceAware()
Indicates whether this parser is XML Namespace aware.
public boolean isValidating()
Indicates whether this parser will validate its input.
public boolean isXIncludeAware()
Indicates whether this parser is XInclude-aware.
- Since:
- 1.3
public void parse(File f, HandlerBase hb) throws SAXException, IOException
Parse the content of the specified file, reporting SAX1 events to the given handler. Prefer the SAX2 version of this method, since the HandlerBase class is now deprecated.
- Parameters:
f
- an XML filehb
- the SAX1 handler
- See Also:
parse(java.io.File,org.xml.sax.helpers.DefaultHandler)
public void parse(File f, DefaultHandler dh) throws SAXException, IOException
Parse the content of the specified file, reporting SAX2 events to the given handler.
- Parameters:
f
- an XML filedh
- the SAX2 handler
public void parse(InputStream is, HandlerBase hb) throws SAXException, IOException
Parse the specifed input stream, reporting SAX1 events to the given handler. Prefer the SAX2 version of this method, since the HandlerBase class is now deprecated. Also prefer the version of this method that specifies a system ID, in order to resolve external references correctly.
- Parameters:
is
- an XML input streamhb
- the SAX1 handler
- See Also:
parse(java.io.InputStream,org.xml.sax.helpers.DefaultHandler)
public void parse(InputStream is, HandlerBase hb, String systemId) throws SAXException, IOException
Parse the specified input stream, reporting SAX1 events to the given handler. Prefer the SAX2 version of this method, since the HandlerBase class is now deprecated.
- Parameters:
is
- an XML input streamhb
- the SAX1 handlersystemId
- the system ID of the XML document
- See Also:
parse(java.io.InputStream,org.xml.sax.helpers.DefaultHandler,java.lang.String)
public void parse(InputStream is, DefaultHandler dh) throws SAXException, IOException
Parse the specified input stream, reporting SAX2 events to the given handler. Prefer the version of this method that specifies a system ID, in order to resolve external references correctly.
- Parameters:
is
- an XML input streamdh
- the SAX2 handler
public void parse(InputStream is, DefaultHandler dh, String systemId) throws SAXException, IOException
Parse the specified input stream, reporting SAX2 events to the given handler.
- Parameters:
is
- an XML input streamdh
- the SAX2 handlersystemId
- the system ID of the XML document
public void parse(String uri, HandlerBase hb) throws SAXException, IOException
Parse the content of the specified URI, reporting SAX1 events to the given handler. Prefer the SAX2 version of this method, since the HandlerBase class is now deprecated.
- Parameters:
uri
- an XML system IDhb
- the SAX1 handler
- See Also:
parse(java.lang.String,org.xml.sax.helpers.DefaultHandler)
public void parse(String uri, DefaultHandler dh) throws SAXException, IOException
Parse the content of the specified URI, reporting SAX2 events to the given handler.
- Parameters:
uri
- an XML system IDdh
- the SAX2 handler
public void parse(InputSource is, HandlerBase hb) throws SAXException, IOException
Parse the specified input source, reporting SAX1 events to the given handler. Prefer the SAX2 version of this method, since the HandlerBase class is now deprecated.
- Parameters:
is
- the SAX input sourcehb
- the SAX1 handler
- See Also:
parse(InputSource,DefaultHandler)
public void parse(InputSource is, DefaultHandler dh) throws SAXException, IOException
Parse the specified input source, reporting SAX2 events to the given handler.
- Parameters:
dh
- the SAX2 handler
public void reset()
Resets this parser to its original configuration.
- Since:
- 1.3
public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException
Sets the specified SAX2 parser property.
- Parameters:
name
- the name of the propertyvalue
- the value of the property