com.caucho.xml2
Class XMLReaderImpl

java.lang.Object
  extended by com.caucho.xml2.XMLReaderImpl
All Implemented Interfaces:
org.xml.sax.XMLReader

public class XMLReaderImpl
extends java.lang.Object
implements org.xml.sax.XMLReader

A fast XML parser.


Field Summary
static java.lang.String XMLNS
           
 
Constructor Summary
XMLReaderImpl()
           
 
Method Summary
 org.xml.sax.ContentHandler getContentHandler()
          Gets the SAX content handler
 org.xml.sax.DTDHandler getDTDHandler()
          Gets the SAX DTD handler
 org.xml.sax.EntityResolver getEntityResolver()
          Gets the SAX entityResolver.
 org.xml.sax.ErrorHandler getErrorHandler()
          Gets the SAX errorHandler.
 boolean getFeature(java.lang.String name)
          Returns a SAX feature.
 java.lang.Object getProperty(java.lang.String name)
          Returns a SAX property.
 void parse(org.xml.sax.InputSource source)
          parses the input source.
 void parse(java.lang.String systemId)
          Parses the file at the given string
 void setContentHandler(org.xml.sax.ContentHandler handler)
          Sets the SAX content handler
 void setDTDHandler(org.xml.sax.DTDHandler handler)
          Sets the SAX DTD handler
 void setEntityResolver(org.xml.sax.EntityResolver resolver)
          Sets the SAX entityResolver.
 void setErrorHandler(org.xml.sax.ErrorHandler handler)
          Sets the SAX errorHandler.
 void setFeature(java.lang.String name, boolean value)
          Sets a SAX feature.
 void setProperty(java.lang.String name, java.lang.Object value)
          Sets a SAX property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XMLNS

public static final java.lang.String XMLNS
See Also:
Constant Field Values
Constructor Detail

XMLReaderImpl

public XMLReaderImpl()
Method Detail

getFeature

public boolean getFeature(java.lang.String name)
                   throws org.xml.sax.SAXNotRecognizedException,
                          org.xml.sax.SAXNotSupportedException
Returns a SAX feature.

All XMLReaders are required to recognize the http://xml.org/sax/features/namespaces and the http://xml.org/sax/features/namespace-prefixes feature names.

Specified by:
getFeature in interface org.xml.sax.XMLReader
Throws:
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
                 throws org.xml.sax.SAXNotRecognizedException,
                        org.xml.sax.SAXNotSupportedException
Sets a SAX property.

Specified by:
setProperty in interface org.xml.sax.XMLReader
Throws:
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

getProperty

public java.lang.Object getProperty(java.lang.String name)
                             throws org.xml.sax.SAXNotRecognizedException,
                                    org.xml.sax.SAXNotSupportedException
Returns a SAX property.

Specified by:
getProperty in interface org.xml.sax.XMLReader
Throws:
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

setFeature

public void setFeature(java.lang.String name,
                       boolean value)
                throws org.xml.sax.SAXNotRecognizedException,
                       org.xml.sax.SAXNotSupportedException
Sets a SAX feature.

Specified by:
setFeature in interface org.xml.sax.XMLReader
Throws:
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

setEntityResolver

public void setEntityResolver(org.xml.sax.EntityResolver resolver)
Sets the SAX entityResolver.

Specified by:
setEntityResolver in interface org.xml.sax.XMLReader
Parameters:
resolver - the entity resolver

getEntityResolver

public org.xml.sax.EntityResolver getEntityResolver()
Gets the SAX entityResolver.

Specified by:
getEntityResolver in interface org.xml.sax.XMLReader
Returns:
the entity resolver

setDTDHandler

public void setDTDHandler(org.xml.sax.DTDHandler handler)
Sets the SAX DTD handler

Specified by:
setDTDHandler in interface org.xml.sax.XMLReader
Parameters:
handler - the dtd handler

getDTDHandler

public org.xml.sax.DTDHandler getDTDHandler()
Gets the SAX DTD handler

Specified by:
getDTDHandler in interface org.xml.sax.XMLReader
Returns:
the dtd handler

setContentHandler

public void setContentHandler(org.xml.sax.ContentHandler handler)
Sets the SAX content handler

Specified by:
setContentHandler in interface org.xml.sax.XMLReader
Parameters:
handler - the content handler

getContentHandler

public org.xml.sax.ContentHandler getContentHandler()
Gets the SAX content handler

Specified by:
getContentHandler in interface org.xml.sax.XMLReader
Parameters:
handler - the content handler

setErrorHandler

public void setErrorHandler(org.xml.sax.ErrorHandler handler)
Sets the SAX errorHandler.

Specified by:
setErrorHandler in interface org.xml.sax.XMLReader
Parameters:
handler - the error handler

getErrorHandler

public org.xml.sax.ErrorHandler getErrorHandler()
Gets the SAX errorHandler.

Specified by:
getErrorHandler in interface org.xml.sax.XMLReader
Parameters:
handler - the error handler

parse

public void parse(org.xml.sax.InputSource source)
           throws java.io.IOException,
                  org.xml.sax.SAXException
parses the input source.

Specified by:
parse in interface org.xml.sax.XMLReader
Parameters:
source - the source to parse from
Throws:
java.io.IOException
org.xml.sax.SAXException

parse

public void parse(java.lang.String systemId)
           throws java.io.IOException,
                  org.xml.sax.SAXException
Parses the file at the given string

Specified by:
parse in interface org.xml.sax.XMLReader
Parameters:
url - the source url to parse from
Throws:
java.io.IOException
org.xml.sax.SAXException