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 : documentation clarity - Unmarshal #8784

gopherbot opened this issue Sep 21, 2014 · 2 comments

encoding/xml : documentation clarity - Unmarshal #8784

gopherbot opened this issue Sep 21, 2014 · 2 comments


Copy link

@gopherbot gopherbot commented Sep 21, 2014

by pyewipe:

In the documentation for Unmarshall

1. The ",chardata" tag if entered as written gives an error ".. invalid
tag in field .." - capitalisation ",charData" works. Similar issue for
",innerxml" which gives the same error, unless a different capitalisation is
used eg ",innerXML" or ",innerXml"

This wasn't obvious. requesting doc shows correct working capitalisations

2. The descriptions of same are not 100% clear: ie

chardata : "If the XML element contains character data, that data is accumulated in
the first struct field that has tag ",chardata" .." initial
interpretation was that this captured only CDATA type data - this was not the case and
captured non CDATA chars

innerxml : "Unmarshal accumulates the raw XML nested inside the element in that
field"  initial expectation was to capture all inner data (excluding CDATA)
including nested xml elements - this was not the case as CDATA was captured but not
nested xml elements or their contents

Not entirely sure what the intended behaviour is. So some additional clarity in
documentation would be a great help.

(Similar issue with ",any" tag - not sure if bug or docs issue - but did not
appear to capture uncaptured xml elements as expected, will file separate issue after

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Sep 21, 2014

Comment 1 by pyewipe:

Mmh. Looks like it was me. misunderstanding the docs. eg!topic/golang-nuts/Klge5TuqH3k
You will probably want to ignore this.

This comment has been minimized.

Copy link

@griesemer griesemer commented Oct 1, 2014

Comment 2:

Labels changed: added repo-main.

Status changed to Retracted.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.