[publican-list] Comments in XML files, good, bad, or ugly?

Paul W. Frields stickster at gmail.com
Wed Oct 15 16:09:49 UTC 2008


On Wed, 2008-10-15 at 09:41 -0400, Jonathan Robie wrote:
> For code examples, I find it useful to be able to drop source code 
> chunks into CDATA sections and immediately see that they look like the 
> original text:
> <eg><![CDATA[<bib>
>   <book>
>     <title>TCP/IP Illustrated</title>
>     <author>Stevens</author>
>     <publisher>Addison-Wesley</publisher>
>   </book>
>   <book>
>     <title>Advanced Programming in the Unix Environment</title>
>     <author>Stevens</author>
>     <publisher>Addison-Wesley</publisher>
>   </book>
>   <book>
>     <title>Data on the Web</title>
>     <author>Abiteboul</author>
>     <author>Buneman</author>
>     <author>Suciu</author>
>   </book>
> </bib>]]></eg>
> 
> I can just look at that and know it's an example with well-formed XML. I 
> can't do that if you remove the CDATA section and use character entities.

I use this method very often, too.

-- 
Paul W. Frields
  gpg fingerprint: 3DA6 A0AC 6D58 FEC4 0233  5906 ACDB C937 BD11 3717
  http://paul.frields.org/   -  -   http://pfrields.fedorapeople.org/
  irc.freenode.net: stickster @ #fedora-docs, #fedora-devel, #fredlug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/publican-list/attachments/20081015/41d7c9d1/attachment.sig>


More information about the publican-list mailing list