com.macromedia.rssu
Class Parser

java.lang.Object
  extended bycom.macromedia.rssu.Parser
Direct Known Subclasses:
AutoParser, RdfStyleParser, RssStyleParser

public abstract class Parser
extends java.lang.Object

This is a base class for all parsers. There are different styles of RSS documents, and those different styles get their own parsers. However, all parsers much extend this object.


Constructor Summary
Parser()
           
 
Method Summary
abstract  Channel parse(org.w3c.dom.Document stream)
          Parse an xml document into a Channel object.
 Channel parse(java.io.File file)
          Parse the contents of a file
 Channel parse(org.xml.sax.InputSource source)
          parse an InputSource, an abstract concept of a source of a document.
 Channel parse(java.io.InputStream stream)
          Parse an input stream
 Channel parse(java.net.URL url)
          Parse the contents of a URL
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parser

public Parser()
Method Detail

parse

public abstract Channel parse(org.w3c.dom.Document stream)
                       throws RssException
Parse an xml document into a Channel object. A Channel object is our top level data model object to represent an Rss feed.

Returns:
an object version of this stream.
Throws:
RssException

parse

public Channel parse(java.io.InputStream stream)
              throws RssException
Parse an input stream

Parameters:
stream - is the stream to parse
Throws:
RssException

parse

public Channel parse(org.xml.sax.InputSource source)
              throws RssException
parse an InputSource, an abstract concept of a source of a document.

Parameters:
source - is the input source to parse
Throws:
RssException

parse

public Channel parse(java.io.File file)
              throws RssException
Parse the contents of a file

Parameters:
file - is the file to parse
Returns:
java objectification of this file
Throws:
RssException

parse

public Channel parse(java.net.URL url)
              throws RssException
Parse the contents of a URL

Parameters:
url - is the url to parse
Returns:
an object reprenting the data at this URL
Throws:
RssException