http://play.golang.org/p/KuGg_5x13n
I am marshalling the structs Set and Set2 (defined below). The results for
Set seem to be wrong. Using Set2 provides a workaround for Set, but I
think the Set example is still a bug. (The example behaves similarly when
using the attribute "innerxml" instead of "chardata".)
type Set struct {
A [2]string `xml:"A>B"`
S string `xml:",chardata"`
}
type CT struct {
D [2]string
}
type Set2 struct {
C CT
S string `xml:",chardata"`
}
The output is as follows:
<Set>
<A>
<B></B>
<B></B>
Wrong?
</A>
</Set>
<Set2>
<C>
<D></D>
<D></D>
</C>
Right?
</Set2>
--
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].
For more options, visit https://groups.google.com/groups/opt_out.