On Tue, Dec 17, 2013 at 12:05 PM, <
ape...@google.com> wrote:
> According to the XML standard and empty element, that is an element with
> empty content and possibly only attributes set, can be both written in the
> form <br/> and <br></br>. I consider the first one to be more appropriate as
> it was designed especially for this case and avoid unnecessary tag name
> repetition.
If both of the forms are allowed by the standard and have equal
semantics - how can one of them can be more or less appropriate?
> However, when I use xml.Encoder, I always get the result in the second form.
> The only documentation issue for empty elements I found was omitempty which
> is not what I want.
> Is there a way to encode empty XML tags in the shorter form? If no, can I
> suggest this feature to the standard package and how do I do it?
The best way is to first convince the dev team that this is a good
idea. Then fill an issue and, optionally but preferably, send a CL for
it.
-j