diff --git a/entry.go b/entry.go index 3018e6a..3158adc 100644 --- a/entry.go +++ b/entry.go @@ -20,7 +20,7 @@ type Entry struct { Summary *Text `xml:"summary,omitempty"` Title *Text `xml:"title"` Updated *Date `xml:"updated"` - Extensions []*ExtensionElement `xml:",any"` + Extensions []*ExtensionElement `xml:",any,omitempty"` } func (e *Entry) checkAuthors() error { diff --git a/feed.go b/feed.go index fe13c8c..b4463fd 100644 --- a/feed.go +++ b/feed.go @@ -21,7 +21,7 @@ type Feed struct { Subtitle *Text `xml:"subtitle,omitempty"` Title *Text `xml:"title"` Updated *Date `xml:"updated"` - Extensions []*ExtensionElement `xml:",any"` + Extensions []*ExtensionElement `xml:",any,omitempty"` Entries []*Entry `xml:"entry,omitempty"` } diff --git a/person.go b/person.go index a22b18f..4e51be6 100644 --- a/person.go +++ b/person.go @@ -10,7 +10,7 @@ type Person struct { Name string `xml:"name"` URI URI `xml:"uri,omitempty"` Email EmailAddress `xml:"email,omitempty"` - Extensions []*ExtensionElement `xml:",any"` + Extensions []*ExtensionElement `xml:",any,omitempty"` } func (p *Person) Check() error { diff --git a/source.go b/source.go index e1e8e84..1d271cd 100644 --- a/source.go +++ b/source.go @@ -16,7 +16,7 @@ type Source struct { Subtitle *Text `xml:"subtitle,omitempty"` Title *Text `xml:"title,omitempty"` Updated *Date `xml:"updated,omitempty"` - Extensions []*ExtensionElement `xml:",any"` + Extensions []*ExtensionElement `xml:",any,omitempty"` } func (s *Source) Check() error {