Introduction Comments
 
A comment block in XML starts with <!-- and ends with -->. Everything can go inside a comment block, except the -- sequence, for compatibility with older format specifications (SGML).

Good:


<!--comment--> no spaces needed between comment symbols and text

<!-- 
comment --> comments can be spawn over multiple lines

Bad:


< !-- comment --> left comment symbol has a space in the middle

<-- comment --> left comment symbol misses a ! character

<!-- -- comment --> comment has a -- sequence
Home