Is there any particular reason (other than it would make the parsing harder) that XML doesn't allow nesting comments, i.e. something like
<!--
<!-- this is the foo element -->
<foo>bar</foo>
-->
?
It would have been entirely possible to allow nested comments, without changing the syntax. The designers of XML chose not to because they were greatly concerned with SGML compatibility: it would have allowed XML documents that were not valid SGML documents.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With