com.sun.syndication.io.impl
Class FeedParsers

java.lang.Object
  extended bycom.sun.syndication.io.impl.FeedParsers

public class FeedParsers
extends java.lang.Object

Parses an XML document (JDOM Document) into a Feed.

It accepts all flavors of RSS (0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) and Atom 0.3 feeds.

The FeedParser is a liberal parser.

FeedParser instances are thread safe.

Parsers for a specific type must extend this class and register in the parser list. (Right now registration is hardcoded in the FeedParser constructor).

Author:
Alejandro Abdelnur

Constructor Summary
FeedParsers()
          Creates a parser instance.
FeedParsers(java.lang.String defaultFile, java.lang.String fileProperty)
           
 
Method Summary
 FeedParser getParserFor(org.jdom.Document document)
          Finds the real parser type for the given document feed.
 java.util.List getSupportedFeedTypes()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeedParsers

public FeedParsers()
Creates a parser instance.


FeedParsers

public FeedParsers(java.lang.String defaultFile,
                   java.lang.String fileProperty)
Method Detail

getSupportedFeedTypes

public java.util.List getSupportedFeedTypes()

getParserFor

public FeedParser getParserFor(org.jdom.Document document)
Finds the real parser type for the given document feed.

Parameters:
document - document feed to find the parser for.
Returns:
the parser for the given document or null if there is no parser for that document.


Copyright © 2004 Sun Microsystems. All Rights Reserved.