Re: elementtree and entities

2007-05-13 Thread Daniel Nogradi
> > 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 ) > > '&' > > > > Sometimes I would like to have the output '&' > > > > element

Re: elementtree and entities

2007-05-13 Thread Duncan Booth
"Daniel Nogradi" <[EMAIL PROTECTED]> wrote: > Hi list, > > 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 ) > '&' > > Sometimes I would li