Spec-Zone .ru
спецификации, руководства, описания, API
JavaTM 2 Platform
Standard Edition

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)
          Called when an HTML comment is encountered.
protected  void handleEmptyTag(TagElement tag)
          Handle Empty Tag.
protected  void handleEndTag(TagElement tag)
          Handle End Tag.
protected  void handleError(int ln, String errorMsg)
          An error has occurred.
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)
Description copied from class: Parser
Called when an HTML comment is encountered.
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)
Description copied from class: Parser
An error has occurred.
Overrides:
handleError in class Parser

JavaTM 2 Platform
Standard Edition

Submit a bug or feature
Java, Java 2D, and JDBC are a trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.