Skip to content

Commit 052f54b

Browse files
committed
fix strict mode did not affect namespace check
1 parent b77f1ba commit 052f54b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

parse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (p *parser) parse() (*Node, error) {
107107
}
108108

109109
if tok.Name.Space != "" {
110-
if _, found := p.space2prefix[tok.Name.Space]; !found {
110+
if _, found := p.space2prefix[tok.Name.Space]; !found && p.decoder.Strict {
111111
return nil, errors.New("xmlquery: invalid XML document, namespace is missing")
112112
}
113113
}

0 commit comments

Comments
 (0)