hotsax.html.sax
Class SaxParser

java.lang.Object
  extended by hotsax.html.sax.SaxParser
All Implemented Interfaces:
XMLReader

public class SaxParser
extends Object
implements XMLReader

SaxParser - lite SAX parser. Based only on

Version:
Author:
edh

Constructor Summary
SaxParser()
          Creates new SaxParser
 
Method Summary
protected  Reader createReader(InputSource source)
          create a Reader to be used by the lexer based on the InputSource Such as
 void endDocument()
           
 void endElement(String name)
           
 ContentHandler getContentHandler()
           
 DTDHandler getDTDHandler()
           
 EntityResolver getEntityResolver()
           
 ErrorHandler getErrorHandler()
           
 boolean getFeature(String p1)
           
 Object getProperty(String p1)
           
 HtmlParser getyyParser()
          Return the HtmlParser handle.
 void parse(InputSource p1)
          Parse the input document using the current InputSource's reader
 void parse(String p1)
          Parser setup code.
 void setContentHandler(ContentHandler p1)
           
 void setDTDHandler(DTDHandler p1)
           
 void setEntityResolver(EntityResolver p1)
           
 void setErrorHandler(ErrorHandler p1)
           
 void setFeature(String p1, boolean p2)
           
 void setProperty(String p1, Object p2)
           
 void startDocument()
           
 void startElement(String name)
          collect attributes into a list and call ContentHandler.startElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaxParser

public SaxParser()
Creates new SaxParser

Method Detail

createReader

protected Reader createReader(InputSource source)
                       throws IOException,
                              MalformedURLException
create a Reader to be used by the lexer based on the InputSource Such as

Throws:
IOException
MalformedURLException

getContentHandler

public ContentHandler getContentHandler()
Specified by:
getContentHandler in interface XMLReader

getProperty

public Object getProperty(String p1)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
Specified by:
getProperty in interface XMLReader
Throws:
SAXNotRecognizedException
SAXNotSupportedException

setFeature

public void setFeature(String p1,
                       boolean p2)
                throws SAXNotRecognizedException,
                       SAXNotSupportedException
Specified by:
setFeature in interface XMLReader
Throws:
SAXNotRecognizedException
SAXNotSupportedException

setEntityResolver

public void setEntityResolver(EntityResolver p1)
Specified by:
setEntityResolver in interface XMLReader

setContentHandler

public void setContentHandler(ContentHandler p1)
Specified by:
setContentHandler in interface XMLReader

setDTDHandler

public void setDTDHandler(DTDHandler p1)
Specified by:
setDTDHandler in interface XMLReader

getErrorHandler

public ErrorHandler getErrorHandler()
Specified by:
getErrorHandler in interface XMLReader

getEntityResolver

public EntityResolver getEntityResolver()
Specified by:
getEntityResolver in interface XMLReader

setErrorHandler

public void setErrorHandler(ErrorHandler p1)
Specified by:
setErrorHandler in interface XMLReader

getDTDHandler

public DTDHandler getDTDHandler()
Specified by:
getDTDHandler in interface XMLReader

setProperty

public void setProperty(String p1,
                        Object p2)
                 throws SAXNotRecognizedException,
                        SAXNotSupportedException
Specified by:
setProperty in interface XMLReader
Throws:
SAXNotRecognizedException
SAXNotSupportedException

getFeature

public boolean getFeature(String p1)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
Specified by:
getFeature in interface XMLReader
Throws:
SAXNotRecognizedException
SAXNotSupportedException

parse

public void parse(String p1)
           throws IOException,
                  SAXException
Parser setup code. Initialize a new reader based on type of URI Call into actual parser below with newly created InputSource. handles URIs of type "http://" and file://

Specified by:
parse in interface XMLReader
Parameters:
p1 - URI to open
Throws:
IOException
SAXException

parse

public void parse(InputSource p1)
           throws IOException,
                  SAXException
Parse the input document using the current InputSource's reader

Specified by:
parse in interface XMLReader
Throws:
IOException
SAXException

startDocument

public void startDocument()
                   throws SAXException
Throws:
SAXException

endDocument

public void endDocument()
                 throws SAXException
Throws:
SAXException

startElement

public void startElement(String name)
                  throws SAXException
collect attributes into a list and call ContentHandler.startElement

Throws:
SAXException

endElement

public void endElement(String name)
                throws SAXException
Throws:
SAXException

getyyParser

public HtmlParser getyyParser()
Return the HtmlParser handle.

Returns:
the handle to yyparser.


Copyright © 2007-2008. All Rights Reserved.