Documentation
¶
Overview ¶
Package wxr implements types corresponding to the Wordpress WXR XML encoding. The initial implementation is consumption oriented and may be incomplete.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category struct { ID int `xml:"term_id"` Slug string `xml:"category_nicename"` Name string `xml:"cat_name"` }
Category describes a category in the blog export
type Channel ¶
type Channel struct { XMLName xml.Name `xml:"channel"` Title string `xml:"title"` Link string `xml:"link"` Categories []Category `xml:"category"` Tags []Tag `xml:"tag"` Description string `xml:"description"` WXRVersion string `xml:"wxr_version"` Items []Item `xml:"item"` }
Channel is the element describing the blog
type Item ¶
type Item struct { XMLName xml.Name `xml:"item"` ID int `xml:"post_id"` Name string `xml:"post_name"` Title string `xml:"title"` Author string `xml:"creator"` Link string `xml:"link"` Categories []ItemCategory `xml:"category"` Content []string `xml:"encoded"` //Content struct { // Body string `xml:",chardata"` //} `xml:"encoded"` Type string `xml:"post_type"` PubDate WpTime `xml:"pubDate"` }
Item is a blog post
type ItemCategory ¶
type ItemCategory struct { XMLName xml.Name `xml:"category"` Domain string `xml:"domain,attr"` Slug string `xml:"nicename,attr"` Name string `xml:",chardata"` }
ItemCategory is a Category or Tag that is associated with an Item
type Tag ¶
type Tag struct { ID int `xml:"term_id"` Slug string `xml:"tag_slug"` Name string `xml:"tag_name"` }
Tag describes a tag in the blog export
type WpTime ¶
WpTime exists to provide UnMarshaling for the wordpress pubDate format
func (*WpTime) UnmarshalText ¶
UnmarshalText attempts to unmarshall the provided byte slice as a time.RFC1123Z
Click to show internal directories.
Click to hide internal directories.