diff --git a/date.go b/date.go index 4827f13..309b165 100644 --- a/date.go +++ b/date.go @@ -7,7 +7,7 @@ import ( type Date struct { *CommonAttributes - DateTime string + DateTime string `xml:",chardata"` } // DateTime formats a time.Time to string formated as defined by RFC3339. It diff --git a/inlineOtherContent.go b/inlineOtherContent.go index 8b8b9ea..4c5eb75 100644 --- a/inlineOtherContent.go +++ b/inlineOtherContent.go @@ -8,7 +8,7 @@ import ( type InlineOtherContent struct { *CommonAttributes - AnyElement any `xml:"anyelement,omitempty"` + AnyElement any `xml:",chardata"` Type MediaType `xml:"type,attr,omitempty"` } diff --git a/inlineTextContent.go b/inlineTextContent.go index 58a9338..8365292 100644 --- a/inlineTextContent.go +++ b/inlineTextContent.go @@ -9,7 +9,7 @@ import ( type InlineTextContent struct { *CommonAttributes Type string `xml:"type,attr,omitempty"` // Must be text or html - Texts []string `xml:"texts,omitempty"` + Texts []string `xml:",chardata"` } // newInlineTextContent creates a new InlineTextContent. It returns a