You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the documentation for Unmarshall http://golang.org/pkg/encoding/xml/#Unmarshal
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
checking)
The text was updated successfully, but these errors were encountered:
Mmh. Looks like it was me. misunderstanding the docs. eg
https://groups.google.com/forum/#!topic/golang-nuts/Klge5TuqH3k
You will probably want to ignore this.
by pyewipe:
The text was updated successfully, but these errors were encountered: