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 :)

Mneumonic
Tuesday, August 31, 2004

<!-- like this -->

Christopher Wells
Tuesday, August 31, 2004

Christopher, you post doesn't show! :)

Alex
Tuesday, August 31, 2004

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


Tuesday, August 31, 2004

<comment></comment>
no wait, i got it:
<REM></REM>
or is it:
</*><//*>
or maybe:
<'></'>

devinmoore.com
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.

test
Tuesday, August 31, 2004

Devin was actually being humorous, you know. :)

Brad Wilson (dotnetguy.techieswithcats.com)
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?

redguardtutu
Tuesday, August 31, 2004

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


Tuesday, August 31, 2004

http://www.w3.org/TR/2004/REC-xml-20040204/#dt-comment

2.5 Comments

[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.
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--->

www.MarkTAW.com
Wednesday, September 01, 2004

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


Wednesday, September 01, 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 01, 2004

*  Recent Topics

*  Fog Creek Home