RSS/Atom parser for Elixir.
Add {:diane, "~> 0.0.1"}
to your mix.exs
deps.
raw_xml = "..." # Feed in raw string form.
{:ok, feed} = Diane.parse(raw_xml)
channel = feed.channels |> List.first
channel.title
# xkcd.com
channel.description
# xkcd.com: A webcomic of romance and math humor.
channel.items |> Enum.map(fn(item) -> item.title end)
# ['Keyboard Mash', 'Vodka', ...]
- RSS 2.0 feed parsing
- RSS 1.x feed parsing
- Atom feed parsing
- Logic to determine what kind of feed to parse.