]> Cypherpunks repositories - gostls13.git/commit
encoding/xml: Marshal ",any" fields
authorChris Jones <chris@cjones.org>
Sat, 22 Dec 2012 15:00:36 +0000 (10:00 -0500)
committerRuss Cox <rsc@golang.org>
Sat, 22 Dec 2012 15:00:36 +0000 (10:00 -0500)
commita9121a19f0a2904e1b7a62d4bb07eb82093bb93a
tree0f40627e050f56e120d0dd29b95172e14ea3de8e
parent9622f5032e67561c822374714aceb779389c3c00
encoding/xml: Marshal ",any" fields

Fixes #3559.

This makes Marshal handle fields marked ",any" instead of ignoring
them. That makes Marshal more symmetrical with Unmarshal, which seems
to have been a design goal.

Note some test cases were changed, because this patch changes
marshalling behavior. I think the previous behavior was buggy, but
there's still a backward-compatibility question to consider.

R=rsc
CC=golang-dev, n13m3y3r
https://golang.org/cl/6938068
src/pkg/encoding/xml/marshal.go
src/pkg/encoding/xml/marshal_test.go
src/pkg/encoding/xml/read.go
src/pkg/encoding/xml/typeinfo.go