https://github.com/gilliek/go-opml
Go (golang) package for parsing OPML files
https://github.com/gilliek/go-opml
go golang opml parsing-opml-files
Last synced: about 1 year ago
JSON representation
Go (golang) package for parsing OPML files
- Host: GitHub
- URL: https://github.com/gilliek/go-opml
- Owner: gilliek
- License: other
- Created: 2014-06-06T18:58:03.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-10T00:22:01.000Z (about 12 years ago)
- Last Synced: 2025-04-03T04:51:11.346Z (about 1 year ago)
- Topics: go, golang, opml, parsing-opml-files
- Language: Go
- Homepage:
- Size: 230 KB
- Stars: 17
- Watchers: 1
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-opml
[](https://travis-ci.org/gilliek/go-opml)
go-opml aims to be a Go package for parsing OPML files.
## Installation
```go get github.com/gilliek/go-opml/opml```
## Usage
Parse OPML from file:
```go
package main
import (
"fmt"
"log"
"github.com/gilliek/go-opml/opml"
)
func main() {
doc, err := opml.NewOPMLFromFile("path/to/file.xml")
if err != nil {
log.Fatal(err)
}
xml, _ := doc.XML()
fmt.Println(xml)
//...
}
```
Parse OPML from URL:
```go
package main
import (
"fmt"
"log"
"github.com/gilliek/go-opml/opml"
)
func main() {
doc, err := opml.NewOPMLFromURL("http://www.example.com/file.xml")
if err != nil {
log.Fatal(err)
}
xml, _ := doc.XML()
fmt.Println(xml)
//...
}
```
## Documentation
Document can be found on [GoWalker](https://gowalker.org/github.com/gilliek/go-opml/opml)
or [GoDoc](http://godoc.org/github.com/gilliek/go-opml/opml)
## License
BSD 3-clauses