then how would i put something like Ü into my xml file? cause it converts it to Ü all the time. (not just 220) plan_rich Am 02.06.11 03:01, schrieb Tres Seaver:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 06/01/2011 04:06 PM, Richard Plangger wrote:
hi there,
i'm quite confused cause putting and& into the text field of an element causes the& to be converted to&?
example:
from lxml import etree root = etree.Element('test') root.text = '&' print(etree.tostring(root)) b'<test>&</test>'
how would I turn that off?
I suppose thats not a bug... its a feature ^^
"Naked" ampersands are not allowed in XML text. '&' is the "escaped" spelling.
Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk3m4QMACgkQ+gerLs4ltQ7VzQCcDgXe59/jqZsRsseIBlvoOwfd a2cAnjrQN/10u107+ljLzzWmmzrobeiH =1YDT -----END PGP SIGNATURE-----
_________________________________________________________________ Mailing list for the lxml Python XML toolkit - http://lxml.de/ lxml@garetjax.info https://mailman-mail5.webfaction.com/listinfo/lxml