Skip to content

encoding/xml: Marshal ignores ",chardata" fields not of type []byte #4506

@gopherbot

Description

@gopherbot

by philipp.schumann:

"What steps will reproduce the problem? What is the expected output? What do you
see instead?"

A float64 tagged as chardata gets unmarshaled just fine with no issues, however
marshaling such a thing results in empty node values:

http://play.golang.org/p/gMsuECdiFe

I'd assume that Marshal() should closely match Unmarshal()'s capabilities. Admittedly
"round-tripping" use-cases are rare, but still...

"Which compiler are you using?"

6g

"Which operating system are you using?"

Windows 7

"Which version are you using?"

1.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeSuggestedIssues that may be good for new contributors looking for work to do.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions