Fix channel and item extensions

This commit is contained in:
regadas 2014-11-22 22:35:38 +00:00
parent e1d228914f
commit 750ceec0f2
1 changed files with 2 additions and 4 deletions

6
rss.go
View File

@ -198,18 +198,16 @@ func (this *Feed) readRss2(doc *xmlx.Document) (err error) {
} }
} }
tl = item.SelectNodes(ns, ns)
i.Extensions = make(map[string]map[string][]Extension) i.Extensions = make(map[string]map[string][]Extension)
for _, lv := range tl { for _, lv := range item.Children {
getExtensions(&i.Extensions, lv) getExtensions(&i.Extensions, lv)
} }
ch.Items = append(ch.Items, i) ch.Items = append(ch.Items, i)
} }
x := node.SelectNodes(ns, ns)
ch.Extensions = make(map[string]map[string][]Extension) ch.Extensions = make(map[string]map[string][]Extension)
for _, v := range x { for _, v := range node.Children {
if v.Name.Space != "" { if v.Name.Space != "" {
getExtensions(&ch.Extensions, v) getExtensions(&ch.Extensions, v)
} }