Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.arthurdo.parser.* (5)

Package Samples:



HtmlStreamTokenizer: HtmlStreamTokenizer is an HTML parser that is similar to the StreamTokenizer class but is specialized for HTML streams. This class is useful when you need to parse the structure of an HTML document. import com.arthurdo.parser.*; HtmlStreamTokenizer tok = new HtmlStreamTokenizer(inputstream); HtmlTag tag = new HtmlTag(); while (tok.nextToken() != HtmlStreamTokenizer.TT_EOF) { int ttype = tok.getTokenType(); if (ttype == HtmlStreamTokenizer.TT_TAG) { tok.parseTag(tok.getStringValue(), tag); System.out.println("tag: " + tag.toString()); } else if (ttype == HtmlStreamTokenizer.TT_TEXT) { ...
Table: Null Cells and Phantom Rows elementAt() can return null if there is no cell at the requested coordinate due to spans across areas where there are no cells, for example, <table> <tr><td rowspan=2>abc<td>def </table> In this case, calling elementAt(1, 1) would return null. Similarly, getRowTag() could return null if the requested index is a phantom row (a row that doesn't have any real cells). In the example above, the table has two rows due to the rowspan but row 1 is a phantom row and does not have a <tr> tag. Implementation Note: the table parser is very strict, ...
TableCell: TableCell repesents a table cell. Normally its elements are a collection of markup and text data. However, if isSpanned() is true, then it is a pseudo cell, a place holder cell that contains the location of the actual cell. Pseudo cells have no elements, i.e. size() returns zero. An example of a pseudo cell would be: <table> <tr><td colspan=2>abc </table> In this case, the cell at coordinate [0,0] is a real cell while [0,1] is a pseudo cell. 02/09/98 Dr. Jaron Collis, added getCharacterData() which returns only the cell's character data, without any markup.
HtmlTag: HtmlTag is a helper class to store parsed tag information.

Home | Contact Us | Privacy Policy | Terms of Service