WordPress XML Parser

Overview
The go-wordpressxml
package provides a WordPress WXR (WordPress eXtended RSS) XML parser.
Documentation
Documentation is provided using godoc and available on GoDoc.org.
Installation
Installing any of the packages will install the entire library. For example:
$ go get github.com/grokify/go-wordpressxml
Usage
import (
"github.com/grokify/go-wordpressxml"
)
func main() {
wp := wordpressxml.NewWordPressXML()
err := wp.ReadFile("myblog.wordpress.2016-08-13.xml")
if err != nil {
panic(err)
}
wp.WriteMetaCSV("articles.csv")
}
Notes
Since WordPress uses content:encoded
and excerpt:encoded
, Go's XML built-in parser treats both of these as the field encoded
in different namespaces. This parser retrieves these fields as an array of encoded
and then moves the data into the Content
property.
Contributing
Features, Issues, and Pull Requests are always welcome.
To contribute:
- Fork it ( http://github.com/grokify/go-wordpressxml/fork )
- Create your feature branch (
git checkout -b my-new-feature
)
- Commit your changes (
git commit -am 'Add some feature'
)
- Push to the branch (
git push origin my-new-feature
)
- Create new Pull Request
Please report issues and feature requests on GitHub.