POV-Ray : Newsgroups : povray.off-topic : XML rant : Re: XML rant Server Time
5 Sep 2024 15:25:55 EDT (-0400)
  Re: XML rant  
From: Tim Attwood
Date: 21 Jun 2009 22:50:42
Message: <4a3ef182$1@news.povray.org>
>>   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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.