tostring() to save the
file and after that apply a replace, nevertheless, I think is a bad and
dirty solution, because I need to add the XML's header <?xml version='1.0' encoding='UTF-8'?> with hardcoding.2015-03-10 20:47 GMT+01:00 Omar Gutiérrez <omar.vpa@gmail.com>:I was wondering why the apostrophe is not automatically escaped as other characters?Because it's not needed?See https://wiki.python.org/moin/EscapingXml for a similar discussion.Python : sys.version_info(major=2, minor=7, micro=6, releaselevel='final', serial=0)but ' is not transformed to '
For example:
< is transformed to <
and
> is transformed to >
lxml.etree : (3, 3, 3, 0)
libxml used : (2, 9, 1)
libxml compiled : (2, 9, 1)
libxslt used : (1, 1, 28)
libxslt compiled : (1, 1, 28)
_________________________________________________________________
Mailing list for the lxml Python XML toolkit - http://lxml.de/
lxml@lxml.de
https://mailman-mail5.webfaction.com/listinfo/lxml
--Amaury Forgeot d'Arc