|
![](/i/fill.gif) |
>> I never understood why the closing tag must be named. What's the point?
>
> A tiny increase in the ability to handle or at least detect malformed XML.
For example lets say you have a very large document, and you
typo and omit a closure. With a named closure you continue parsing
the document until you hit the next closure, and see that it doesn't
match, so you can exit early with an error. If you have unnamed
closures, then you continue parsing until the end of the file, (or the
top level tag), where you can then generate an error that says there
are more tags than closures, but then that error can't say for sure
which closure is missing, since unnamed closures are interchangable.
Personally I find flat tags clearer than forcing them into trees.
Post a reply to this message
|
![](/i/fill.gif) |