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]


What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s