update xml serialize
This commit is contained in:
parent
bebbd57b58
commit
8b8d3c3384
4
xml.go
4
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})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user