Skip to content

Commit

Permalink
fix UnknownXMLTags for simple elements
Browse files Browse the repository at this point in the history
  • Loading branch information
clbanning committed Nov 28, 2018
1 parent 696448e commit 48fe3f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions unknowntags.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ func checkAllTags(mv interface{}, val reflect.Value, s *[]string, key string) {

// 5. check that map keys correspond to exported field names
// We handle the keys in the map literally, unlike for encoding/json.
// But first remove any "#text" keys if it's a simple element.
delete(mm, "#text")

var spec *fieldSpec
for k, m := range mm {
for _, sk := range skiptags {
Expand Down

0 comments on commit 48fe3f9

Please sign in to comment.