[XML-SIG] XMLToolkit 0,7,BETA.2
Petko Petkov
ppetkov at gnucitizen.org
Mon Dec 12 14:32:18 CET 2005
Oh, yes :)
You are right. I guess the best thing to do is:
return cdatastring[9:-3]
Right now I am rearranging all the parsing methods. Also, I am adding
methods that can compose xml.
Thanks.
Fredrik Lundh wrote:
> Petko Petkov wrote:
>
>
>> return cdatastring.lstrip('<![CDATA[').rstrip(']]>')
>>
>
> this doesn't do what you think it does:
>
>
>>>> data = "<!CDATA[CDATA]]>"
>>>> data.lstrip('<![CDATA[').rstrip(']]>')
>>>>
> ''
>
>>>> data = "TADA!"
>>>> data.lstrip('<![CDATA[').rstrip(']]>')
>>>>
> ''
>
>>>> data = "<hello />"
>>>> data.lstrip('<![CDATA[').rstrip(']]>')
>>>>
> 'hello /'
>
> </F>
>
>
>
> _______________________________________________
> XML-SIG maillist - XML-SIG at python.org
> http://mail.python.org/mailman/listinfo/xml-sig
>
More information about the XML-SIG
mailing list