<<

NAME

Feed::Parser::Feed

DESCRIPTION

Objects of this class represent the feed/channel element of the overall feed.

METHODS

Any feed or channel element that does not have a corresponding entry here is available via its name. If it has a namespace and is not an Atom or RDFSS element then its name will be preceded by the standard namespace label and an underscore. For instance, a Dublin Core date is available as "dc_date". There are one exception to this. The Atom link elements is available as "atom_link".

REMEMBER HTML and XHTML may contain relative links. You will need to resolve these yourself. Elements known to contain HTML and XHTML will have an attribute named "base" that contains the base URI to be used when resolving relative links for that element.

Any element known to contain localizable text will have an attribute named "lang" that contains the language of the text.

base -- @xml:base, link, rss:link, atom:link[@rel="alternate"], atom:link[@rel="self"], atom:link

Returns the base URL for any relative URL-s in this document. This is the xml:base attribute on the feed/rss/RDF/channel tag, or if that doesn't exist, ->link, or failing that ->url, or failing that, the first link -returned by >links.

Because the xml:base attribute can show up on any tag and this only reflects its value on the feed/rss/RDF/channel tag, this should only be used as a last resort. The system will set a base attribute on every HTML bearing element and all unknown elements.

This will be an object of class of Feed::Parser::Element::Link.

title -- title, rss:title, atom:title, dc:title

The title of the feed. This is usually a short, one line name for the this feed.

This will be an object of class of Feed::Parser::Element::Text.

subtitle -- atom:subtitle, atom:tagline, itunes:subtitle, description, dc:description

This would be a second line of the title. Usually short and pithy.

description -- rss:description, dc:description, atom:info, atom:subtitle, atom:tagline, itunes:summary, itunes:subtitle

In theory this is a one paragraph description of the content that the feed is syndicating. In practice it's often the same as the subtitle.

This will be an object of class of Feed::Parser::Element::Text.

url -- atom:link[@rel="self"]

This is the URL of the feed itself. It read from the Atom link with a rel attribute set to "self". These links can appear in non-Atom feeds if they are given an appropriate namespace.

This will be an object of class of Feed::Parser::Element::Link.

link -- link, rss:link, atom:link[@rel="alternate"]

This is a link to the website that this is a feed for. It stringifies to the IRI of that website. It has two attributes:

rel -- This is always "alternate"

href -- The IRI of the website

If its source was an Atom link tag then it may also have these attributes:

title

length

hreflang

If the feed is RSS then this is the link element and failing that a link element in the Atom namespace. Atom link elements are often used in RSS with rel="self" to provide the URL of the feed itself. If there are more then one link element an RSS channel then the first link element is used.

If the document is Atom then this is the first link element with rel="alternate" or no rel at all.

This will be an object of class of Feed::Parser::Element::Link.

links -- link + rss:link + atom:link

This is the first link element in an RSS feed and all Atom link elements in an RSS or Atom feed.

These will be objects of class of Feed::Parser::Element::Link.

updated -- atom:updated, atom:modified, pubDate, dc:date

This will be an object of class DateTime

language -- language, dc:language, @lang

This will be an object of class of Feed::Parser::Element.

authors -- atom:author + dc:creator

These will be objects of class of Feed::Parser::Element::Person.

contributors -- atom:contributor + dc:contributor

These will be objects of class of Feed::Parser::Element::Person.

categories -- category + itunes:category

iTunes provided categories have their scheme/domain attribute set to:

 http://www.itunes.com/DTDs/Podcast-1.0.dtd
These will be objects of class of Feed::Parser::Element.

rights -- atom:rights, copyright, dc:rights

This will be an object of class of Feed::Parser::Element::Text.

generator -- generator, admin:generatorAgent

This will be an object of class of Feed::Parser::Element::Text.

id -- id, dc:identifier, ->link, ->url

The identifier for this feed. While this should be globally unique, in practice it isn't, even with Atom where this is part of the spec. It all falls down when you have authenticated, customized feeds.

First it tries the Atom id element, failing that it falls back to the link returned by the "link" method and finally, failing that it'll try the "url" method.

image -- image, atom:logo, atom:icon

If present this is guaranteed to stringify to the URL of the image. It _may_ have the attributes title, link, width, height and description but this is not guaranteed.

SEE ALSO

Feed::Parser::Result Feed::Parser::Item Feed::Parser::Element Feed::Parser::Element::Link Feed::Parser::Element::Person Feed::Parser::Element::Text

<<