Java Platform 1.2

javax.swing.text.html.parser
Class DocumentParser

java.lang.Object
  |
  +--javax.swing.text.html.parser.Parser
        |
        +--javax.swing.text.html.parser.DocumentParser

public class DocumentParser
extends Parser

A Parser for HTML Documents. Read an InputStream of HTML and invoke the appropriate methods in the ParserCallback class.


Fields inherited from class javax.swing.text.html.parser.Parser
dtd, strict
 
Constructor Summary
DocumentParser(DTD dtd)
           
 
Method Summary
protected  void handleComment(char[] text)
           
protected  void handleEmptyTag(TagElement tag)
          Handle Empty Tag.
protected  void handleEndTag(TagElement tag)
          Handle End Tag.
protected  void handleError(int ln, String errorMsg)
           
protected  void handleStartTag(TagElement tag)
          Handle Start Tag.
protected  void handleText(char[] data)
          Handle Text.
 void parse(Reader in, HTMLEditorKit.ParserCallback callback, boolean ignoreCharSet)
           
 
Methods inherited from class javax.swing.text.html.parser.Parser
endTag, error, error, error, error, flushAttributes, getAttributes, getCurrentLine, getCurrentPos, handleEOFInComment, handleTitle, makeTag, makeTag, markFirstTime, parse, parseDTDMarkup, parseMarkupDeclarations, startTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentParser

public DocumentParser(DTD dtd)
Method Detail

parse

public void parse(Reader in,
                  HTMLEditorKit.ParserCallback callback,
                  boolean ignoreCharSet)
           throws IOException

handleStartTag

protected void handleStartTag(TagElement tag)
Handle Start Tag.
Overrides:
handleStartTag in class Parser

handleComment

protected void handleComment(char[] text)
Overrides:
handleComment in class Parser

handleEmptyTag

protected void handleEmptyTag(TagElement tag)
                       throws ChangedCharSetException
Handle Empty Tag.
Overrides:
handleEmptyTag in class Parser

handleEndTag

protected void handleEndTag(TagElement tag)
Handle End Tag.
Overrides:
handleEndTag in class Parser

handleText

protected void handleText(char[] data)
Handle Text.
Overrides:
handleText in class Parser

handleError

protected void handleError(int ln,
                           String errorMsg)
Overrides:
handleError in class Parser

Java Platform 1.2

Submit a bug or feature Version 1.2 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.