Example 10     <<      >>       intro       contents     

Comments may appear anywhere in a document outside other markup. An XML processor may, but need not, make it possible for an application to retrieve the text of comments. The string "--" (double-hyphen) must not occur within comments.

  Well-formed documents   HOME     

Comment can contain any characters apart from --:

               <!-- doc A -->
               <example>
               <!-- <HEAD>  -->
               <!-- Characters <&<  -->
               </example>
               
            

  Documents with errors   HOME     

Comment must not contain --:

               <example>
                    <!-- A -- B -->
               </example>