views:

18

answers:

1

For example, in the case of XML data such as the following:

<foo>bar</foo>

The opening and closing < and > symbols could be called brackets.

However, in the following:

<br />
<data foo="bar" />
<blah a="1" b="2" />

Is there a good name for the closing /> token?

“There are only two hard things in Computer Science: cache invalidation and naming things!” -- Phil Karlton

+1  A: 

Section 3.1 of the XML specification refers to such tags as "Empty-Element Tags".

[44]    EmptyElemTag       ::=      '<' Name (S Attribute)* S? '/>'

So I would call the /> part the "empty element terminator".

Greg Hewgill
Perfect, thanks very much!
HoboBen