API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.text.html.parser. Parser View Source
Author(s)
Arthur van Hoff
Sunita Mani
Since
Version
1.47, 02/26/06
Serial
Hierarchy
 Object
      Parser
Implements
 DTDConstants
Subclasses
Description
public class Parser
  A simple DTD-driven HTML parser.
Constructors
public Parser (DTD dtd)
Methods
Hide/Show inherited methods
pack-private void addString (int c)
Add a char to the string buffer.
protected void endTag (boolean omitted)
  Handle an end tag.
protected void error (String err)
protected void error (String err, String arg1)
protected void error (String err, String arg1, String arg2)
protected void error (String err, String arg1, String arg2, String arg3)
Invoke the error handler.
pack-private void errorContext () throws ChangedCharSetException
  Error context.
protected void flushAttributes ()
protected SimpleAttributeSet getAttributes ()
pack-private int getBlockStartPosition ()
  Returns the start position of the current block.
pack-private char getChars (int pos)
pack-private char getChars (int pos, int endPos)
protected int getCurrentLine ()
 
protected int getCurrentPos ()
pack-private String getEndOfLineString ()
  Returns the end of line string.
pack-private String getString (int pos)
Get the string that's been accumulated.
protected void handleComment (char[] text)
Called when an HTML comment is encountered.
protected void handleEmptyTag (TagElement tag) throws ChangedCharSetException
Called when an empty tag is encountered.
protected void handleEndTag (TagElement tag)
Called when an end tag is encountered.
protected void handleEOFInComment ()
protected void handleError (int ln, String msg)
An error has occurred.
protected void handleStartTag (TagElement tag)
Called when a start tag is encountered.
protected void handleText (char[] text)
Called when PCDATA is encountered.
pack-private void handleText (TagElement tag)
Output text.
protected void handleTitle (char[] text)
Called when an HTML title tag is encountered.
pack-private boolean ignoreElement (Element elem)
pack-private boolean legalElementContext (Element elem) throws ChangedCharSetException
Create a legal content for an element.
pack-private void legalTagContext (TagElement tag) throws ChangedCharSetException
Create a legal context for a tag.
protected TagElement makeTag (Element elem)
protected TagElement makeTag (Element elem, boolean fictional)
Makes a TagElement.
protected void markFirstTime (Element elem)
Marks the first time a tag has been seen in a document
publicsynchronized void parse (Reader in) throws IOException
Parse an HTML stream, given a DTD.
pack-private void parseAttributeSpecificationList (Element elem) throws IOException
  Parse attribute specification List.
pack-private String parseAttributeValue (boolean lower) throws IOException
  Parse attribute value.
pack-private void parseComment () throws IOException
  Parse a comment.
pack-private void parseContent () throws IOException
  Parse Content.
public String parseDTDMarkup () throws IOException
  Parses th Document Declaration Type markup declaration.
pack-private boolean parseIdentifier (boolean lower) throws IOException
  Parse identifier.
pack-private void parseInvalidTag () throws IOException
Parse an invalid tag.
pack-private void parseLiteral (boolean replace) throws IOException
  Parse literal content.
protected boolean parseMarkupDeclarations (StringBuffer strBuff) throws IOException
  Parse markup declarations.
pack-private void parseScript () throws IOException
pack-private void parseTag () throws IOException
Parse a start or end tag.
pack-private void resetStrBuffer ()
pack-private void skipSpace () throws IOException
  Skip space.
protected void startTag (TagElement tag) throws ChangedCharSetException
  Handle a start tag.
pack-private int strIndexOf (char target)
Fields
Hide/Show inherited fields
publicfinalstatic int ANY = "19" [Inherited From DTDConstants]
publicfinalstatic int CDATA = "1" [Inherited From DTDConstants]
publicfinalstatic int CONREF = "4" [Inherited From DTDConstants]
publicfinalstatic int CURRENT = "3" [Inherited From DTDConstants]
publicfinalstatic int DEFAULT = "131072" [Inherited From DTDConstants]
protected DTD dtd
publicfinalstatic int EMPTY = "17" [Inherited From DTDConstants]
publicfinalstatic int ENDTAG = "14" [Inherited From DTDConstants]
publicfinalstatic int ENTITIES = "3" [Inherited From DTDConstants]
publicfinalstatic int ENTITY = "2" [Inherited From DTDConstants]
publicfinalstatic int FIXED = "1" [Inherited From DTDConstants]
publicfinalstatic int GENERAL = "65536" [Inherited From DTDConstants]
publicfinalstatic int ID = "4" [Inherited From DTDConstants]
publicfinalstatic int IDREF = "5" [Inherited From DTDConstants]
publicfinalstatic int IDREFS = "6" [Inherited From DTDConstants]
publicfinalstatic int IMPLIED = "5" [Inherited From DTDConstants]
publicfinalstatic int MD = "16" [Inherited From DTDConstants]
publicfinalstatic int MODEL = "18" [Inherited From DTDConstants]
publicfinalstatic int MS = "15" [Inherited From DTDConstants]
publicfinalstatic int NAME = "7" [Inherited From DTDConstants]
publicfinalstatic int NAMES = "8" [Inherited From DTDConstants]
publicfinalstatic int NMTOKEN = "9" [Inherited From DTDConstants]
publicfinalstatic int NMTOKENS = "10" [Inherited From DTDConstants]
publicfinalstatic int NOTATION = "11" [Inherited From DTDConstants]
publicfinalstatic int NUMBER = "12" [Inherited From DTDConstants]
publicfinalstatic int NUMBERS = "13" [Inherited From DTDConstants]
publicfinalstatic int NUTOKEN = "14" [Inherited From DTDConstants]
publicfinalstatic int NUTOKENS = "15" [Inherited From DTDConstants]
publicfinalstatic int PARAMETER = "262144" [Inherited From DTDConstants]
publicfinalstatic int PI = "12" [Inherited From DTDConstants]
publicfinalstatic int PUBLIC = "10" [Inherited From DTDConstants]
publicfinalstatic int RCDATA = "16" [Inherited From DTDConstants]
publicfinalstatic int REQUIRED = "2" [Inherited From DTDConstants]
publicfinalstatic int SDATA = "11" [Inherited From DTDConstants]
publicfinalstatic int STARTTAG = "13" [Inherited From DTDConstants]
protected boolean strict
  This flag determines whether or not the Parser will be strict in enforcing SGML compatibility.
publicfinalstatic int SYSTEM = "17" [Inherited From DTDConstants]
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar