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


this not programming question per se, wondering why name of tag required in closing tag in xml. instance, couldn't

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

be written

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

so each closing tag </> merely terminated last opened tag?

so questions are

  1. would work (i.e. there corner cases i'm not thinking of in ambiguous/fail)?
  2. if work, why didn't 'they' design way?

if work, why didn't 'they' design way?

one reason sgml/xml designed human readable. /a/b example readable, structure more complex nightmare try interpret.

this true mixed content (pcdata , element structures mixed).


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -