Matt Ellen
Matt Ellen

Reputation: 11612

My document includes end tags of the form </>, is this XML? If not, what is it?

I'm working with data that looks like XML, but the closing tags don't match the name of the opening tags, the closing tags are empty tags. Is this valid XML?

<tagname>tag value</>

Upvotes: 0

Views: 28

Answers (1)

Quentin
Quentin

Reputation: 944200

No. That is SGML empty end tag syntax. It is referenced in the HTML 4 (HTML was an SGML application prior to HTML 5) specification in the notes about Shorthand markup

It is not valid in XML.

See the design goals of XML:

Terseness in XML markup is of minimal importance

which has the annotation:

The historical reason for this goal is that the complexity and difficulty of SGML was greatly increased by its use of minimization, i.e. the omission of pieces of markup, in the interest of terseness. In the case of XML, whenever there was a conflict between conciseness and clarity, clarity won.

Upvotes: 3

Related Questions