com.sun.java.help.impl

Class Parser


public class Parser
extends DocumentParser

This class parses an HTML or XML document.

Nested Class Summary

protected static class
Parser.ParserMulticaster

Field Summary

protected ParserListener
listenerList

Fields inherited from class com.sun.java.help.impl.DocumentParser

source

Constructor Summary

Parser(InputStream in)
***** Public interface ***** *****
Parser(Reader src)

Method Summary

void
addParserListener(ParserListener l)
protected void
comment(String s)
This method inserts a comment It should be overridden by the subclass
protected void
doctype(String root, String publicId, String systemId)
This method emits a doctype.
protected String
documentAttribute(String name)
This method looks up a &xxx; sequence in the document properties (this is used for templates).
protected void
errorString(String s)
This method inserts a parse error string into the document It should be overridden by the subclass
protected void
flush(char[] buf, int offset, int length)
This method creates a block of text for a document.
protected void
pi(String target, String data)
This method emits a pi It should be overridden by the subclass
void
removeParserListener(ParserListener l)
protected void
tag(String name, TagProperties atts, boolean endTag, boolean emptyTag)
This method emits a tag It should be overridden by the subclass

Methods inherited from class com.sun.java.help.impl.DocumentParser

callFlush, comment, commentEOFError, doctype, documentAttribute, eofError, errorString, findCloseAngleForComment, flush, generateError, getDocumentSource, handleCommentOrDoctype, initEntities, parse, parseEscape, parseTag, parseText, pi, readChar, scanIdentifier, scanQuotedString, setInput, setInput, setShouldCacheSource, setXmlEntities, skipToCloseAngle, skipWhite, tag

Field Details

listenerList

protected ParserListener listenerList

Constructor Details

Parser

public Parser(InputStream in)
***** Public interface ***** *****

Parser

public Parser(Reader src)

Method Details

addParserListener

public void addParserListener(ParserListener l)

comment

protected void comment(String s)
This method inserts a comment It should be overridden by the subclass
Overrides:
comment in interface DocumentParser

doctype

protected void doctype(String root,
                       String publicId,
                       String systemId)
This method emits a doctype. Internal subset information is discarded It should be overridden by the subclass
Overrides:
doctype in interface DocumentParser

documentAttribute

protected String documentAttribute(String name)
This method looks up a &xxx; sequence in the document properties (this is used for templates). A return of null means the proerty is undefined. It should be overridden by the subclass
Overrides:
documentAttribute in interface DocumentParser

errorString

protected void errorString(String s)
This method inserts a parse error string into the document It should be overridden by the subclass
Overrides:
errorString in interface DocumentParser

flush

protected void flush(char[] buf,
                     int offset,
                     int length)
This method creates a block of text for a document. It should be overridden by the subclass
Overrides:
flush in interface DocumentParser

pi

protected void pi(String target,
                  String data)
This method emits a pi It should be overridden by the subclass
Overrides:
pi in interface DocumentParser

removeParserListener

public void removeParserListener(ParserListener l)

tag

protected void tag(String name,
                   TagProperties atts,
                   boolean endTag,
                   boolean emptyTag)
This method emits a tag It should be overridden by the subclass
Overrides:
tag in interface DocumentParser