All Packages Class Hierarchy This Package Previous Next Index

Class org.jfouffa.parser.html.DocumentParser

java.lang.Object
   |
   +----org.jfouffa.parser.html.Parser
           |
           +----org.jfouffa.parser.html.DocumentParser

public class DocumentParser
extends Parser
This is a hybrid parser for HTML document.


Constructor index

 o DocumentParser()
Create a new MLParser.
 o DocumentParser(int)
Create a new MLParser with a number of listeners.

Method index

 o addListener(DocumentListener)
Add a listener to this parser.
 o parseDocument(URL, Reader)
Parse a document from an URL in a stream.

Constructors

 o DocumentParser
 public DocumentParser()
Create a new MLParser.

 o DocumentParser
 public DocumentParser(int nbrListeners)
Create a new MLParser with a number of listeners.

Parameters:
nbrListeners - Number of listeners

Methods

 o addListener
 public void addListener(DocumentListener listener)
Add a listener to this parser.

Parameters:
listener - The DocumentListener
 o parseDocument
 public void parseDocument(URL location,
                           Reader reader) throws IOException, ParseException
Parse a document from an URL in a stream.

Parameters:
location - The URL location of the document.
reader - The stream where the parser should read the document.
Throws: IOException
An I/O exception occurs during parse
Throws: ParseException
An error appears during parse