Re: ElementTree and Unicode

2006-08-02 Thread Sébastien Boisgérault
Martin v. Löwis wrote: > Sébastien Boisgérault schrieb: > > I am trying to embed an *arbitrary* (unicode) strings inside > > an XML document. Of course I'd like to be able to reconstruct > > it later from the xml document ... If the naive way to do it does > > not work, can anyone suggest a way to

Re: ElementTree and Unicode

2006-08-02 Thread Martin v. Löwis
Sébastien Boisgérault schrieb: > I am trying to embed an *arbitrary* (unicode) strings inside > an XML document. Of course I'd like to be able to reconstruct > it later from the xml document ... If the naive way to do it does > not work, can anyone suggest a way to do it ? XML does not support arb

Re: ElementTree and Unicode

2006-08-02 Thread Martin v. Löwis
Sébastien Boisgérault schrieb: > I am trying to embed an *arbitrary* (unicode) strings inside > an XML document. Of course I'd like to be able to reconstruct > it later from the xml document ... If the naive way to do it does > not work, can anyone suggest a way to do it ? XML does not support arb

Re: ElementTree and Unicode

2006-08-02 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Sébastien Boisgérault wrote: > I am trying to embed an *arbitrary* (unicode) strings inside > an XML document. Of course I'd like to be able to reconstruct > it later from the xml document ... If the naive way to do it does > not work, can anyone suggest a way to do it ? E

Re: ElementTree and Unicode

2006-08-02 Thread Sébastien Boisgérault
Richard Brodie wrote: > "Sébastien Boisgérault" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > element = Element("string", value=u"\x00") > > I'm not as familiar with elementtree.ElementTree as I perhaps > should be. However, you appear to be trying to insert a null > chara

Re: ElementTree and Unicode

2006-08-02 Thread Richard Brodie
"Sébastien Boisgérault" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] element = Element("string", value=u"\x00") I'm not as familiar with elementtree.ElementTree as I perhaps should be. However, you appear to be trying to insert a null character into an XML document. Should y

ElementTree and Unicode

2006-08-02 Thread Sébastien Boisgérault
I guess I am doing something wrong ... Any clue ? >>> from elementtree.ElementTree import * >>> element = Element("string", value=u"\x00") >>> xml = tostring(element) >>> XML(xml) Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.4/site-packages/elementtree/Eleme