Both forms are legal. For example, if <empty> is an empty element, the
following are equivalent:
See the examples at the end of section 3.1 in the XML spec.
XML, Databases, and Schemas
Speaker, Geek Cruises' XML Excursion '02
Chris Proctor wrote:
> Hi all,
> 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.