Hello,
The playground: https://go.dev/play/p/EQTHwGlKQDt
I have this xml
data := []byte(`<xml1>
<xml2>hello</xml2>
<xml3><xml4>foobar</xml4></xml3>
</xml1>`)
That, I want to unmarhsall into xmlBody struct:
type (
xml3 struct {
Data string `xml:",innerxml"`
}
xmlBody struct {
XML2 string `xml:"xml2"`
XML3 xml3 `xml:"xml3"`
}
)
Unfortunately, I am not able to get <xml3><xml4>foobar</xml4></xml3> as
string in x.XML3.Data.
Thanks in advance for your help.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/6758327a-7e1a-4741-8dc4-def8547a61f6n%40googlegroups.com.