gist.lithium
Class MarkupParser

java.lang.Object
  extended by javax.swing.text.html.parser.Parser
      extended by javax.swing.text.html.parser.DocumentParser
          extended by gist.lithium.MarkupParser
All Implemented Interfaces:
javax.swing.text.html.parser.DTDConstants

public class MarkupParser
extends javax.swing.text.html.parser.DocumentParser

Parses DTD events, creating XMLElem objects that contain (X)HTML entities.

Author:
Grinnell Internet Syndication Team

Field Summary
private static MarkupDTD markupDTD
          Contains definitions for (X)HTML elements and attributes
 
Fields inherited from class javax.swing.text.html.parser.Parser
dtd, strict
 
Fields inherited from interface javax.swing.text.html.parser.DTDConstants
ANY, CDATA, CONREF, CURRENT, DEFAULT, EMPTY, ENDTAG, ENTITIES, ENTITY, FIXED, GENERAL, ID, IDREF, IDREFS, IMPLIED, MD, MODEL, MS, NAME, NAMES, NMTOKEN, NMTOKENS, NOTATION, NUMBER, NUMBERS, NUTOKEN, NUTOKENS, PARAMETER, PI, PUBLIC, RCDATA, REQUIRED, SDATA, STARTTAG, SYSTEM
 
Constructor Summary
MarkupParser()
          Constructs a MarkupParser.
 
Method Summary
static void main(java.lang.String[] args)
          Parses a sequence of (X)HTML files entered from the command line, writing the results to the last command line argument entered.
static XMLElem parseFiles(javax.swing.DefaultListModel list, javax.swing.JTextArea browserLog)
          Parses files from a DefaultListModel and writes results to an output file.
 
Methods inherited from class javax.swing.text.html.parser.DocumentParser
handleComment, handleEmptyTag, handleEndTag, handleError, handleStartTag, handleText, parse
 
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
 

Field Detail

markupDTD

private static final MarkupDTD markupDTD
Contains definitions for (X)HTML elements and attributes

Constructor Detail

MarkupParser

public MarkupParser()
Constructs a MarkupParser.

Method Detail

parseFiles

public static XMLElem parseFiles(javax.swing.DefaultListModel list,
                                 javax.swing.JTextArea browserLog)
Parses files from a DefaultListModel and writes results to an output file.

Parameters:
list - the list of (X)HTML files to be parsed

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Parses a sequence of (X)HTML files entered from the command line, writing the results to the last command line argument entered.

Parameters:
args - containing a list of files
Throws:
java.lang.Exception