com.lightdev.app.shtm

Class SHTMLDocument.SHTMLReader

public class SHTMLDocument.SHTMLReader extends HTMLReader

This reader extends HTMLDocument.HTMLReader by the capability to handle SPAN tags
Constructor Summary
SHTMLReader(int offset, boolean emptyDocument)
Constructor
Method Summary
voidhandleComment(char[] data, int pos)
voidhandleEndTag(Tag t, int pos)
Handles end tag.
voidhandleSimpleTag(Tag t, MutableAttributeSet a, int pos)
SPAN tags are directed to handleSimpleTag by the parser.
voidhandleStartTag(Tag tag, MutableAttributeSet attributeSet, int pos)
Handles the start tag received by the parser.

Constructor Detail

SHTMLReader

public SHTMLReader(int offset, boolean emptyDocument)
Constructor

Method Detail

handleComment

public void handleComment(char[] data, int pos)

handleEndTag

public void handleEndTag(Tag t, int pos)
Handles end tag. If a SPAN tag is directed to this method, end its action, otherwise, let HTMLDocument.HTMLReader do the work

handleSimpleTag

public void handleSimpleTag(Tag t, MutableAttributeSet a, int pos)
SPAN tags are directed to handleSimpleTag by the parser. If a SPAN tag is detected in this method, it gets redirected to handleStartTag and handleEndTag respectively.

handleStartTag

public void handleStartTag(Tag tag, MutableAttributeSet attributeSet, int pos)
Handles the start tag received by the parser. If it is a SPAN tag, converts the contents of the STYLE attribute to an AttributeSet, and adds it to the contents of this tag. Otherwise lets HTMLDocument.HTMLReader do the work.