Bruno Pedro


What is an empty XML element?

Following a very enthusiastic discussion today at work, here’s the proper definition of an empty XML element, according to the W3C Recommendation of 26 November 2008:

[Definition: An element with no content is said to be empty.] The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. – Extensible Markup Language (XML) 1.0 (Fifth Edition) § “Content of Elements”

[it’s curious that this discussion came up one day after XML’s 15th birthday]