Ja.NET Standard Edition 5.0

Documentation API Specification

Contents

DocumentParser Class Reference

Inherits javax::swing::text::html::parser::Parser.

List of all members.


Public Member Functions

 DocumentParser (final DTD dtd)
void parse (final Reader in, final HTMLEditorKit.ParserCallback callback, final boolean ignoreCharSet) throws IOException

Protected Member Functions

void handleError (final int ln, final String errorMsg)
 This method is called when an error is found in the parsed file.
void handleText (final char[] data)
 This method is called when a piece of text is found in the parsed file.
void handleEndTag (final TagElement tag)
 This method is called when a closing tag is found in the parsed file.
void handleEmptyTag (final TagElement tag) throws ChangedCharSetException
 This method is called when a simple or empty tag is found in the parsed file.
void handleComment (final char[] text)
 This method is called when a comment is found in the parsed file.
void handleStartTag (final TagElement tag)
 This method is called when an opening tag, that is not simple or empty, is found in the parsed file.

Private Attributes

HTMLEditorKit.ParserCallback callback
boolean ignoreCharSet

Static Private Attributes

static final HTML.Attribute HTTP_EQUIV
static final String CONTENT_TYPE = "content-type"
static final HTML.Attribute CONTENT
static final String CHARSET = "charset"

Constructor & Destructor Documentation

DocumentParser ( final DTD  dtd  ) 


Member Function Documentation

void handleError ( final int  ln,
final String  msg 
) [protected]

This method is called when an error is found in the parsed file.

Parameters:
ln the line number where the error was found.
msg an appropiate message for the found error.

Reimplemented from Parser.

void handleText ( final char[]  text  )  [protected]

This method is called when a piece of text is found in the parsed file.

Parameters:
text the piece of text found in the document.

Reimplemented from Parser.

void handleEndTag ( final TagElement  tag  )  [protected]

This method is called when a closing tag is found in the parsed file.

Parameters:
tag the TagElement that contains the information of the parsed opening tag.

Reimplemented from Parser.

void handleEmptyTag ( final TagElement  tag  )  throws ChangedCharSetException [protected]

This method is called when a simple or empty tag is found in the parsed file.

Parameters:
tag the TagElement that contains the information of the parsed opening tag.
Exceptions:
ChangedCharSetException 

Reimplemented from Parser.

void handleComment ( final char[]  text  )  [protected]

This method is called when a comment is found in the parsed file.

Parameters:
text the text found as comment.

Reimplemented from Parser.

void handleStartTag ( final TagElement  tag  )  [protected]

This method is called when an opening tag, that is not simple or empty, is found in the parsed file.

Parameters:
tag the TagElement that contains the information of the parsed opening tag.

Reimplemented from Parser.

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


Member Data Documentation

final HTML.Attribute HTTP_EQUIV [static, private]

Initial value:

 
        HTML.getAttributeKey("http-equiv")

final String CONTENT_TYPE = "content-type" [static, private]

final HTML.Attribute CONTENT [static, private]

Initial value:

 
        HTML.getAttributeKey("content")

final String CHARSET = "charset" [static, private]

HTMLEditorKit.ParserCallback callback [private]

boolean ignoreCharSet [private]