atom/inlineXHTMLContent.go

24 lines
482 B
Go

package atomfeed
import "errors"
type InlineXHTMLContent struct {
*CommonAttributes
Type string `xml:"type,attr"`
XHTMLDiv string `xml:"xhtmldiv"`
}
func (i *InlineXHTMLContent) IsContent() bool { return true }
func (i *InlineXHTMLContent) Check() error {
if i.Type != "xhtml" {
return errors.New("type attribute of inline xhtml content must be xhtml")
}
if i.XHTMLDiv == "" {
return errors.New("xhtmlDiv element of inline xhtml content empty")
}
return nil
}