Top Description Fields Constructors Methods
com.rometools.rome.io.impl

public Class FeedParsers

extends PluginManager<WireFeedParser>
Class Inheritance
Imports
java.util.List, org.jdom2.Document, com.rometools.rome.io.WireFeedParser

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 WireFeedParser is a liberal parser.

WireFeedParser 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 WireFeedParser constructor).

Field Summary

Modifier and TypeField and Description
public static final String
FEED_PARSERS_KEY

WireFeedParser.classes= [className] ...

Constructor Summary

AccessConstructor and Description
public
FeedParsers()

Creates a parser instance.

Method Summary

Modifier and TypeMethod and Description
protected String
public WireFeedParser

Returns:

the parser for the given document or null if there is no parser for that document.
getParserFor
(final Document
document feed to find the parser for.
document
)

Finds the real parser type for the given document feed.

public List<String>
Inherited from com.rometools.rome.io.impl.PluginManager:
getKeysgetPlugingetPluginMapgetPlugins

Field Detail

FEED_PARSERS_KEYback to summary
public static final String FEED_PARSERS_KEY

WireFeedParser.classes= [className] ...

Constructor Detail

FeedParsersback to summary
public FeedParsers()

Creates a parser instance.

Method Detail

getKeyback to summary
protected String getKey(final WireFeedParser obj)

Implements abstract com.rometools.rome.io.impl.PluginManager.getKey.

Annotations
@Override
getParserForback to summary
public WireFeedParser getParserFor(final Document document)

Finds the real parser type for the given document feed.

Parameters
document:Document

document feed to find the parser for.

Returns:WireFeedParser

the parser for the given document or null if there is no parser for that document.

getSupportedFeedTypesback to summary
public List<String> getSupportedFeedTypes()