|Did you know ...||Search Documentation:|
|Pack atom_feed -- prolog/atom_feed.pl|
stream(Stream)- an input stream
file(File)- a file name to read from
atom(Atom)- Atom or RSS XML in an atom
codes(Codes)- Atom or RSS XML in a list of codes
url(Url)- a URL to fetch
This is the first step in working with an Atom or RSS feed. If an RSS feed has multiple channels, only the first channel is considered.
It's not possible to reliably extract summaries from RSS entries. That's because summary and content is confounded into a single 'description' element.
For example, to find the URL to an HTML alternative:
link(Feed, Link), rel(Link, alternate), type(Link, text/html), href(Link, Url).
alternateis used instead. That's why this predicate's mode is
Because RSS links can't specify a 'rel', we use
alternate for them
Type/Subtypewhich allows one to do things like
type(Link, text/_) % link has a textual type
The Atom spec says that 'type' is optional. If it's missing, this
predicate fails. RSS spec says the link points to "the HTML website",
so MediaType is always
Subtype may contain punctuation so remember to quote: