En Tue, 10 Mar 2009 05:40:10 -0200, Stefan Behnel <stefan...@behnel.de> escribió:
Gabriel Genellina wrote:
En Mon, 09 Mar 2009 15:30:31 -0200, Petr Muller <a...@afri.cz> escribió:

I don't know what else is illegal in xml, so I've searched if there's
some method how to prepare strings for insertion to a xml doc before I
start research on a xml spec and write such function on my own.

You don't have to; Python already comes with xml support. Using
ElementTree to build the document is usually easier and faster:
http://effbot.org/zone/element-index.htm

While I usually second that, this isn't the problem here. This thread is
about unallowed characters in XML. The set of allowed characters is defined
here:

http://www.w3.org/TR/xml/#charsets

Ouch. Sorry, I was under the false impression that a) control characters were allowed, and b) ElementTree would escape them. Both are wrong, and I stand corrected.

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to