com.sun.syndication.io.impl
Class RSS10Parser
java.lang.Object
com.sun.syndication.io.impl.BaseWireFeedParser
com.sun.syndication.io.impl.RSS090Parser
com.sun.syndication.io.impl.RSS10Parser
- All Implemented Interfaces:
- WireFeedParser
public class RSS10Parser
- extends RSS090Parser
Method Summary |
protected org.jdom2.Namespace |
getRSSNamespace()
Returns the namespace used by RSS elements in document of the RSS 1.0
|
boolean |
isMyType(org.jdom2.Document document)
Indicates if a JDom document is an RSS instance that can be parsed with
the parser. |
protected WireFeed |
parseChannel(org.jdom2.Element rssRoot)
Parses the root element of an RSS document into a Channel bean. |
protected Item |
parseItem(org.jdom2.Element rssRoot,
org.jdom2.Element eItem)
Parses an item element of an RSS document looking for item information. |
protected Description |
parseItemDescription(org.jdom2.Element rssRoot,
org.jdom2.Element eDesc)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RSS10Parser
public RSS10Parser()
RSS10Parser
protected RSS10Parser(String type,
org.jdom2.Namespace ns)
isMyType
public boolean isMyType(org.jdom2.Document document)
- Indicates if a JDom document is an RSS instance that can be parsed with
the parser.
It checks for RDF ("http://www.w3.org/1999/02/22-rdf-syntax-ns#") and RSS
("http://purl.org/rss/1.0/") namespaces being defined in the root
element.
- Specified by:
isMyType
in interface WireFeedParser
- Overrides:
isMyType
in class RSS090Parser
- Parameters:
document
- document to check if it can be parsed with this parser
implementation.
- Returns:
- true if the document is RSS1., false otherwise.
getRSSNamespace
protected org.jdom2.Namespace getRSSNamespace()
- Returns the namespace used by RSS elements in document of the RSS 1.0
- Overrides:
getRSSNamespace
in class RSS090Parser
- Returns:
- returns "http://purl.org/rss/1.0/".
parseItem
protected Item parseItem(org.jdom2.Element rssRoot,
org.jdom2.Element eItem)
- Parses an item element of an RSS document looking for item information.
It first invokes super.parseItem and then parses and injects the
description property if present.
- Overrides:
parseItem
in class RSS090Parser
- Parameters:
rssRoot
- the root element of the RSS document in case it's needed
for context.eItem
- the item element to parse.
- Returns:
- the parsed RSSItem bean.
parseChannel
protected WireFeed parseChannel(org.jdom2.Element rssRoot)
- Description copied from class:
RSS090Parser
- Parses the root element of an RSS document into a Channel bean.
It reads title, link and description and delegates to parseImage,
parseItems and parseTextInput. This delegation always passes the root
element of the RSS document as different RSS version may have this
information in different parts of the XML tree (no assumptions made
thanks to the specs variaty)
- Overrides:
parseChannel
in class RSS090Parser
- Parameters:
rssRoot
- the root element of the RSS document to parse.
- Returns:
- the parsed Channel bean.
parseItemDescription
protected Description parseItemDescription(org.jdom2.Element rssRoot,
org.jdom2.Element eDesc)
Copyright © 2004–2013 ROME Project. All rights reserved.