XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] What characters can go into a CDATA section and acomment? (I found inconsistencies)

On Thu, Mar 24, 2022 at 1:58 PM Peter Flynn <peter@silmaril.ie> wrote:
THE most important use case IMNSHO is for documenting markup. I like to
be able to write:

<programlisting language="XML"><![CDATA[
<?xml version="1.0">
<!DOCTYPE foo SYSTEM "bar.dtd">
<foo>
   <title>Some &lt;title></title>
</foo>
]]></programlisting>

How is above mentioned code snippet, more useful than writing within comments like below,

<programlisting language="XML">
<!--<?xml version="1.0">
<!DOCTYPE foo SYSTEM "bar.dtd">
<foo>
   <title>Some &lt;title></title>
</foo>-->
</programlisting>

It seems to me that, XML comments are meant to be ignored (they're sort of noise). Is that the reason, or only reason to use CDATA section instead?
 

--
Regards,
Mukul Gandhi


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS