If you ask, because you got errors with the <!-- --> syntax, it's most likely the CDATA section (and there the ]]> part), that then lies in the middle of the comment. It should not make a difference, but ideal and real world can be quite a bit apart, sometimes (especially when it comes to XML processing).
Try to change the ]]>, too:
<!--detail>
<band height="20">
<staticText>
<reportElement x="180" y="0" width="200" height="20"/>
<text><![CDATA[Hello World!]--><!--]></text>
</staticText>
</band>
</detail-->
Another thing, that comes to mind: If the content of your XML somewhere contains two hyphens, the comment immediately ends there:
<!-- <a> This is strange -- but true!</a> -->
--------------------------^ comment ends here