HoboBen
HoboBen

Reputation: 3100

What is the terminating part of a xml single/stand-alone tag called?

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

Upvotes: 3

Views: 87

Answers (1)

Greg Hewgill
Greg Hewgill

Reputation: 994371

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".

Upvotes: 2

Related Questions