Re: XMLToolkit 0,7,BETA.2

"Fredrik Lundh" <[email protected]>
Newsgroups gmane.comp.python.xml
Message-ID <[email protected]>
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  -  [email protected]
http://mail.python.org/mailman/listinfo/xml-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.