Skip to content

Commit

Permalink
fix strict mode did not affect namespace check
Browse files Browse the repository at this point in the history
  • Loading branch information
felodesu committed Aug 2, 2022
1 parent b77f1ba commit 052f54b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (p *parser) parse() (*Node, error) {
}

if tok.Name.Space != "" {
if _, found := p.space2prefix[tok.Name.Space]; !found {
if _, found := p.space2prefix[tok.Name.Space]; !found && p.decoder.Strict {
return nil, errors.New("xmlquery: invalid XML document, namespace is missing")
}
}
Expand Down

0 comments on commit 052f54b

Please sign in to comment.