-
Notifications
You must be signed in to change notification settings - Fork 0
/
rss.go
60 lines (57 loc) · 1.65 KB
/
rss.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package main
import "encoding/xml"
type Items []struct {
Text string `xml:",chardata"`
Title string `xml:"title"`
Description string `xml:"description"`
Content struct {
Text string `xml:",chardata"`
URL string `xml:"url,attr"`
Type string `xml:"type,attr"`
Expression string `xml:"expression,attr"`
Width string `xml:"width,attr"`
Height string `xml:"height,attr"`
Description struct {
Text string `xml:",chardata"`
Type string `xml:"type,attr"`
} `xml:"description"`
Credit struct {
Text string `xml:",chardata"`
Role string `xml:"role,attr"`
Scheme string `xml:"scheme,attr"`
} `xml:"credit"`
} `xml:"content"`
Encoded string `xml:"encoded"`
Guid string `xml:"guid"`
Link string `xml:"link"`
PubDate string `xml:"pubDate"`
}
type Rss struct {
XMLName xml.Name `xml:"rss"`
Text string `xml:",chardata"`
Content string `xml:"content,attr"`
Atom string `xml:"atom,attr"`
Media string `xml:"media,attr"`
Version string `xml:"version,attr"`
Channel struct {
Text string `xml:",chardata"`
Link struct {
Text string `xml:",chardata"`
Href string `xml:"href,attr"`
Rel string `xml:"rel,attr"`
Type string `xml:"type,attr"`
} `xml:"link"`
Title string `xml:"title"`
Description string `xml:"description"`
Language string `xml:"language"`
Category string `xml:"category"`
Copyright string `xml:"copyright"`
Image struct {
Text string `xml:",chardata"`
Title string `xml:"title"`
URL string `xml:"url"`
Link string `xml:"link"`
} `xml:"image"`
Item Items `xml:"item"`
} `xml:"channel"`
}