Simple RSS parser for Go
Go
Pull request Compare This branch is 27 commits ahead, 19 commits behind ungerik:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tests
.gitignore
README.md
channel.go
date.go
date_test.go
item.go
item_enclosure.go
rss.go
rss_test.go

README.md

Go RSS Parser

Install

go get github.com/c9s/go-rss/rss

Usage

import "github.com/c9s/go-rss/rss"
r, err := rss.ReadUrl("http://....path/to/feed.xml")

for _, item := r.Channel.Items {
    // item.Title
    // item.Content
}

newItem := rss.Item{}
newItem.Title = "New Title"
newItem.Content = `Content..............`
r.Channel.AddItem(&newItem)

err = rss.WriteFile("feedout.xml",r)

License

Public Domain