Are XML/HTML tag names inside closing tags really necessary?

Viewed 496

This is really not a programming question per se, but I was wondering why the name of the tag is required in a closing tag in XML. For instance, couldn't

<a>
    <b>stuff</b>
</a>

Be written

<a>
    <b>stuff</>
</>

So that each closing tag </> merely terminated the last opened tag?

So my questions are

  1. Would this work (i.e. are there any corner cases I'm not thinking of in which this would be ambiguous/fail)?
  2. If it would work, why didn't 'they' design it that way?
2 Answers
Related