org.apache.sling.commons.html.internal

## Class TagstreamHtmlParser

- java.lang.Object
- - org.apache.sling.commons.html.internal.TagstreamHtmlParser

All Implemented Interfaces:
  HtmlParser

    public class TagstreamHtmlParser
    extends Object
    implements HtmlParser

### Constructor Summary

Constructors
Constructor and Description
`TagstreamHtmlParser()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `parse(InputStream stream, String encoding, ContentHandler contentHandler)` Parse HTML and send SAX events.
`Document` `parse(String systemId, InputStream stream, String encoding)` Parse HTML and return a DOM Document.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### TagstreamHtmlParser

    public TagstreamHtmlParser()

### Method Detail

#### parse

    public void parse(InputStream stream,
                      String encoding,
                      ContentHandler contentHandler)
               throws SAXException

Description copied from interface: `HtmlParser`
Parse HTML and send SAX events.

Specified by:
  `parse` in interface `HtmlParser`
Parameters:
  `stream` - The input stream
  `encoding` - Encoding of the input stream, `null` for default encoding.
  `contentHandler` - Content handler receiving the SAX events. The content handler might also implement the lexical handler interface.
Throws:
  `SAXException` - Exception thrown when parsing fails.
See Also:
  `HtmlParser.parse(java.io.InputStream, java.lang.String, org.xml.sax.ContentHandler)`

#### parse

    public Document parse(String systemId,
                          InputStream stream,
                          String encoding)
                   throws IOException

Description copied from interface: `HtmlParser`
Parse HTML and return a DOM Document.

Specified by:
  `parse` in interface `HtmlParser`
Parameters:
  `systemId` - The system id
  `stream` - The input stream
  `encoding` - Encoding of the input stream, `null` for default encoding.
Returns:
  A DOM Document built from parsed HTML or `null`
Throws:
  `IOException` - Exception thrown when parsing fails.
See Also:
  `HtmlParser.parse(java.lang.String, java.io.InputStream, java.lang.String)`