Fog Creek Software
Discussion Board

Commenting out

This is a naive questions - but it is bugging me.

How does one comment out a XML doc?

comment out

///comment out

/* comment out

Thanks for your help :)

Tuesday, August 31, 2004

<!-- like this -->

Christopher Wells
Tuesday, August 31, 2004

Christopher, you post doesn't show! :)

Tuesday, August 31, 2004

Aley, you're mean (but that is pretty funny).

Tuesday, August 31, 2004

no wait, i got it:
or is it:
or maybe:
Tuesday, August 31, 2004

devinmore: it's none of your suggestions, I'm afraid

Messer, Gabel, Feuer, Licht
Tuesday, August 31, 2004

Please don't treat the following lines as code.

Tuesday, August 31, 2004

Devin was actually being humorous, you know. :)

Brad Wilson (
Tuesday, August 31, 2004

I am meaning to make softwares to make American lazy programmer funny ha ha and I think there is muchs market for such a utility.  What did you tinks?

Tuesday, August 31, 2004

Like This ( I have commented out the following line):

Tuesday, August 31, 2004


[Definition: Comments MAY appear anywhere in a document outside other markup; in addition, they MAY appear within the document type declaration at places allowed by the grammar. They are not part of the document's character data; an XML processor MAY, but need not, make it possible for an application to retrieve the text of comments. For compatibility, the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity references MUST NOT be recognized within comments.
[15]      Comment      ::=      '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'

An example of a comment:

<!-- declarations for <head> & <body> -->

Note that the grammar does not allow a comment ending in --->. The following example is not well-formed.

<!-- B+, B, or B--->
Wednesday, September 1, 2004

It doesn't allow them to be nested either :-(

Wednesday, September 1, 2004

golly, I always thought that you could use as many - as you want as long as you close them appropriately...

<!--- blah --->

<!---- etc ---->

i like i
Wednesday, September 1, 2004

*  Recent Topics

*  Fog Creek Home