diff --git a/xml.go b/xml.go index 92db2f1..c1b618d 100644 --- a/xml.go +++ b/xml.go @@ -72,7 +72,7 @@ type AnyMap map[string]any type xmlMapEntry struct { XMLName xml.Name - Value string `xml:",chardata"` + Value any `xml:",chardata"` } func (m *AnyMap) MarshalXML(e *xml.Encoder, start xml.StartElement) error { @@ -88,7 +88,7 @@ func (m *AnyMap) MarshalXML(e *xml.Encoder, start xml.StartElement) error { return err } - for k, v := range m { + for k, v := range *m { _ = e.Encode(xmlMapEntry{XMLName: xml.Name{Local: k}, Value: v}) }