lxml tostring quoting too much

andrea crotti andrea.crotti.0 at gmail.com
Tue Aug 6 13:38:17 EDT 2013


I would really like to do the following:

from lxml import etree as ET
from lxml.builder import E

url = "http://something?x=10&y=20"
l = E.link(url)
ET.tostring(l) -> "<link>http://something?x=10&y=20</link>"

However the lxml tostring always quotes the &, I can't find a way to
tell it to avoid quoting it.
Is it possible?
Thanks



More information about the Python-list mailing list