Multiline text in XML file

Stefan Behnel stefan_ml at behnel.de
Sun Aug 3 02:51:44 EDT 2008


King wrote:
> Is there any other way to define multiline text in a XML file:
> 
> <Help><![CDATA[
> multiline
> multiline
> multiline
> multiline
> ...
> ]]>
> </Help>

Yes, without the CDATA, for example. XML doesn't treat line ending characters
any different from other characters.

I have no idea what you are trying to achieve since you didn't tell us (and
this newsgroup seems the wrong place to discuss this), but maybe it's this:

    <Help>
       <line>text of first line</line>
       <line>text of second line</line>
       <line>text of third line</line>
       <line>...</line>
    </Help>

Stefan



More information about the Python-list mailing list