diff options
Diffstat (limited to 'libgo/go/encoding/xml/read.go')
-rw-r--r-- | libgo/go/encoding/xml/read.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libgo/go/encoding/xml/read.go b/libgo/go/encoding/xml/read.go index dde68de..4419ed1 100644 --- a/libgo/go/encoding/xml/read.go +++ b/libgo/go/encoding/xml/read.go @@ -271,6 +271,10 @@ func (p *Parser) unmarshal(val reflect.Value, start *StartElement) error { case reflect.Struct: sv = v typ := sv.Type() + if typ == nameType { + v.Set(reflect.ValueOf(start.Name)) + break + } tinfo, err = getTypeInfo(typ) if err != nil { return err |