[reportlab-users] XML markup error

Jerome Alet reportlab-users@reportlab.com
Mon, 7 Jun 2004 08:53:53 +0200


On Mon, Jun 07, 2004 at 08:20:43AM +0200, Ulrich Wisser wrote:
> 
>       Paragraph('Smith & Son')
> 
> Is there a function to transform the string to proper XML?

I usually call the replace() method on strings, begining with 
replace("&", "&amp;") then doing the < and > ("&" should be first 
else you'll have some problems) 

maybe the standard python library contains something better, though

bye

Jerome Alet
-- 
"Ni dieu ! Ni Maitre ?" - Me.