Class SHTMLDocument.SHTMLReader

Enclosing class:
SHTMLDocument

public class SHTMLDocument.SHTMLReader extends HTMLDocument.HTMLReader
This reader extends HTMLDocument.HTMLReader by the capability to handle SPAN tags
  • Constructor Details

    • SHTMLReader

      public SHTMLReader(int offset, boolean emptyDocument)
      Constructor
  • Method Details

    • handleStartTag

      public void handleStartTag(HTML.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.
      Overrides:
      handleStartTag in class HTMLDocument.HTMLReader
    • handleSimpleTag

      public void handleSimpleTag(HTML.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.
      Overrides:
      handleSimpleTag in class HTMLDocument.HTMLReader
    • handleEndTag

      public void handleEndTag(HTML.Tag tag, int pos)
      Handles end tag. If a SPAN tag is directed to this method, end its action, otherwise, let HTMLDocument.HTMLReader do the work
      Overrides:
      handleEndTag in class HTMLDocument.HTMLReader
    • handleComment

      public void handleComment(char[] data, int pos)
      Overrides:
      handleComment in class HTMLDocument.HTMLReader