XML comments and "--"

Posted by Vi. on Stack Overflow See other posts from Stack Overflow or by Vi.
Published on 2012-05-31T22:26:45Z Indexed on 2012/05/31 22:40 UTC
Read the original article Hit count: 206

Filed under:
|
<!-- here is some comment --
                            ^
                            |
                    what can be here apart from '>'?

XML seems not to like '--' inside comments. I read somewhere that '--' switchs some modes inside <! ... > thing, but <!-- -- -- --> (even number of --s) seem to be invalid too. If it is some historic feature, what is "pro" part of it? ("contra" part is inability to have -- in comments).

What is the reason of complicating comment processing by not making just '-->' end of comment and allowing '--' inside?

© Stack Overflow or respective owner

Related posts about Xml

Related posts about comments