public class RSS extends Object implements Serializable
The <rss> element.
From the RSS 2.0 specification...
At the top level, a RSS document is a <rss> element, with a mandatory attribute called version, that specifies the version of RSS that the document conforms to. If it conforms to this specification, the version attribute must be 2.0.
Subordinate to the <rss> element is a single <channel> element, which contains information about the channel (metadata) and its contents. RSS originated in 1999, and has strived to be a simple, easy to understand format, with relatively modest goals. After it became a popular format, developers wanted to extend it using modules defined in namespaces, as specified by the W3C.
RSS 2.0 adds that capability, following a simple rule. A RSS feed may contain elements not described on this page, only if those elements are defined in a namespace.
The elements defined in this document are not themselves members of a namespace, so that RSS 2.0 can remain compatible with previous versions in the following sense - - a version 0.91 or 0.92 file is also a valid 2.0 file. If the elements of RSS 2.0 were in a namespace, this constraint would break, a version 0.9x file would not be a valid 2.0 file.
The version="2.0" attribute of the <rss> element is automatically provided in this implementation.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Attribute |
getAttribute(String attrName) |
List<Attribute> |
getAttributes() |
Channel |
getChannel() |
Extension |
getExtension(String extName) |
List<Extension> |
getExtensions() |
int |
hashCode() |
String |
toString()
Shows the contents of the <rss> element.
|
public Channel getChannel()
public List<Attribute> getAttributes()
public List<Extension> getExtensions()
public Attribute getAttribute(String attrName)
attrName - the name of the attribute to get.public Extension getExtension(String extName)
extName - the element name of the extension. eg. "atom:link" or
"someExtension"Copyright © 2014. All rights reserved.