In XML, it is perfectly fine to have empty elements, the problem occurs in
HTML. In XML, there is a short-cut for an empty element. <elementname />
Note there is a space after the element name and before the slash. That
space will keep browsers from choking on your well-formed HTML. (e.g. <br
/>) The space is not necessary for XML however.
I have a question regarding the use of empty-element tags. I have an XML
document that contains some elements that at times may be empty. I was
reading that it's illegal in XML to use start/end tags with empty elements.
Is this true and if so, I assume that I can alternate between start/end tag
and empty-element tags, correct? I am pretty new to XML and I'd appreciate
any input that would help me to produce good, well structured files.