encoding/xml: add example and docs for anon fields

Anonymous pointer fields is not yet supported.
The problem is documented in issue 3108.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5694043
This commit is contained in:
Gustavo Niemeyer 2012-02-23 01:35:50 -02:00
parent adbadf444d
commit 6c20f5c013
3 changed files with 29 additions and 10 deletions

View file

@ -57,6 +57,8 @@ const (
// if the field value is empty. The empty values are false, 0, any
// nil pointer or interface value, and any array, slice, map, or
// string of length zero.
// - a non-pointer anonymous struct field is handled as if the
// fields of its value were part of the outer struct.
//
// If a field uses a tag "a>b>c", then the element c will be nested inside
// parent elements a and b. Fields that appear next to each other that name