Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoding/xml: typo in docs #12833

Closed
ShawnMilo opened this issue Oct 3, 2015 · 1 comment
Closed

encoding/xml: typo in docs #12833

ShawnMilo opened this issue Oct 3, 2015 · 1 comment

Comments

@ShawnMilo
Copy link

The documentation of func Unmarshal states:

Unmarshal uses a case-sensitive comparison to match XML element names to tag values and struct field names.

Unless I'm really confused about something, that should be "case-insensitive" instead. At least, that's my experience with using encoding/xml and encoding/json.

@rakyll rakyll changed the title Typo in encoding/xml package. encoding/xml: typo in docs Oct 3, 2015
@rakyll
Copy link
Contributor

rakyll commented Oct 3, 2015

The documentation is accurate. The field won't match if the XML element's case doesn't match. See http://play.golang.org/p/9oZIgl9n3X where Name is an empty string after unmarshalling.

@rakyll rakyll closed this as completed Oct 3, 2015
@golang golang locked and limited conversation to collaborators Oct 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants