|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.lightdev.lib.html.HTMLFilter
public class HTMLFilter
HTMLFilter parses an HTML input stream using the Light Development XML parser and strips all HTML text returning only content text.
| Constructor Summary | |
|---|---|
HTMLFilter()
construct a new object instance of class HTMLFilter |
|
| Method Summary | |
|---|---|
String |
filter(InputStream in)
filter a given HTML input stream, i.e. strip all tags and return content text only |
String |
filter(String expr)
|
void |
handleEndTag(String tagName)
handle an end tag, unused here |
void |
handleStartTag(String tagName,
AttributeSet a)
handle a start tag, unused here |
void |
handleText(String text)
handle text, i.e. append it to the filtered content buffer |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HTMLFilter()
HTMLFilter
| Method Detail |
|---|
public String filter(InputStream in)
throws IOException,
IllegalCharacterException
in - the HTML input stream
IOException
IllegalCharacterException
public String filter(String expr)
throws IOException,
IllegalCharacterException
IOException
IllegalCharacterException
public void handleStartTag(String tagName,
AttributeSet a)
handleStartTag in interface XmlParserCallbacktagName - the name of the tag that has been encountereda - the attributes of the tag that has been encounteredXmlParserCallback.handleStartTag(java.lang.String, javax.swing.text.AttributeSet)public void handleEndTag(String tagName)
handleEndTag in interface XmlParserCallbacktagName - the name of the tag that has been encounteredXmlParserCallback.handleEndTag(java.lang.String)public void handleText(String text)
handleText in interface XmlParserCallbacktext - the text portion that has been parsedXmlParserCallback.handleText(java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||