All Packages Class Hierarchy This Package Previous Next Index
Class hplb.xml.util.HtmlScanner
java.lang.Object
|
+----org.xml.sax.HandlerBase
|
+----hplb.xml.util.HtmlScanner
- public class HtmlScanner
- extends HandlerBase
The HtmlScanner parses an HTML document for elements containing links.
For each link found it will invoke a client-provided callback method.
It knows about most HTML4.0 links and also knows about the <base>.
For an example use see UrlScanner.
- Author:
- Anders Kristensen
- See Also:
- HtmlObserver, UrlScanner
-
HtmlScanner(InputStream, URL, HtmlObserver)
- Parse the input on the specified stream as if it was HTML and
invoke the provided observer as links are encountered.
-
HtmlScanner(InputStream, URL, HtmlObserver, Object)
- Parse the input on the specified stream as if it was HTML and
invoke the provided observer as links are encountered.
-
HtmlScanner(URL, HtmlObserver)
- Parse the input on the specified stream as if it was HTML and
invoke the provided observer as links are encountered.
-
startElement(String, AttributeMap)
- Handle a start element event.
HtmlScanner
public HtmlScanner(URL url,
HtmlObserver observer) throws Exception
- Parse the input on the specified stream as if it was HTML and
invoke the provided observer as links are encountered.
- Parameters:
- url - the URL to parse for links
- observer - the callback object
- data - client-specific data; this is passed back to the
client in callbacks; this scanner doesn't use it
- See Also:
- parse
HtmlScanner
public HtmlScanner(InputStream in,
URL url,
HtmlObserver observer) throws Exception
- Parse the input on the specified stream as if it was HTML and
invoke the provided observer as links are encountered.
- Parameters:
- in - the input stream
- url - the URL corresponding to this document
- observer - the callback object
- See Also:
- parse
HtmlScanner
public HtmlScanner(InputStream in,
URL url,
HtmlObserver observer,
Object data) throws Exception
- Parse the input on the specified stream as if it was HTML and
invoke the provided observer as links are encountered.
- Parameters:
- in - the input stream
- url - the URL corresponding to this document
- observer - the callback object
- data - client-specific data; this is passed back to the
client in callbacks; this scanner doesn't use it
- See Also:
- parse
startElement
public void startElement(String name,
AttributeMap attributes)
- Handle a start element event.
- Overrides:
- startElement in class HandlerBase
All Packages Class Hierarchy This Package Previous Next Index