Hi list,
How does one prevent elementtree converting & to & (and similarly
for other entities)?
'<test>&</test>'
Sometimes I would like to have the output '<test>&</test>'
Daniel
How does one prevent elementtree converting & to & (and similarly
for other entities)?
>>from xml.etree import ElementTree as et
>>x = et.Element( 'test' )
>>x.text = '&'
>>et.tostring ( x )
>>x = et.Element( 'test' )
>>x.text = '&'
>>et.tostring ( x )
Sometimes I would like to have the output '<test>&</test>'
Daniel
Comment