aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/xml/xml.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding/xml/xml.go')
-rw-r--r--src/encoding/xml/xml.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/encoding/xml/xml.go b/src/encoding/xml/xml.go
index a1e63ed30d..582cfee222 100644
--- a/src/encoding/xml/xml.go
+++ b/src/encoding/xml/xml.go
@@ -493,8 +493,12 @@ func (d *Decoder) popElement(t *EndElement) bool {
d.err = d.syntaxError("element <" + s.name.Local + "> closed by </" + name.Local + ">")
return false
case s.name.Space != name.Space:
+ ns := name.Space
+ if name.Space == "" {
+ ns = `""`
+ }
d.err = d.syntaxError("element <" + s.name.Local + "> in space " + s.name.Space +
- " closed by </" + name.Local + "> in space " + name.Space)
+ " closed by </" + name.Local + "> in space " + ns)
return false
}