diff --git a/xml.go b/xml.go index 2abb039..b96b65e 100644 --- a/xml.go +++ b/xml.go @@ -288,7 +288,11 @@ func mapToXmlIndent(doIndent bool, s *string, key string, value interface{}, pp return nil case nil: // terminate the tag + if doIndent { + *s += p.padding + } *s += "<" + key + endTag, isSimple = true, true break default: // handle anything - even goofy stuff elen = 0