J
Jesper Olsen
Hi,
I'm using the XMLWriter from the effbot element tree module:
http://effbot.org/zone/xml-writer.htm
I'd like to output the element "<span> </span>"
and I try this
w=XMLWriter(f)
w.element("span", " ", id="txt")
But that does not work because " " gets escaped to "&nbsp;"
- and using " " does not work either because space does not get
escaped...
Is there a way to do this?
Another thing I noticed is when outputting the element
<meta http-equiv="content-type" content="text/html" />
then is not possible to generate this by passing attributes as
keywords
to the w.element method - so it is necessary to use the slightly less
elegant form
w.element("meta", None, {"http-equiv":"contenttype",
"content":"text/html"})
I guess there is no way to avoid this - since the module relies on
pythons
way of handling keyword parameters...
/Jesper
I'm using the XMLWriter from the effbot element tree module:
http://effbot.org/zone/xml-writer.htm
I'd like to output the element "<span> </span>"
and I try this
w=XMLWriter(f)
w.element("span", " ", id="txt")
But that does not work because " " gets escaped to "&nbsp;"
- and using " " does not work either because space does not get
escaped...
Is there a way to do this?
Another thing I noticed is when outputting the element
<meta http-equiv="content-type" content="text/html" />
then is not possible to generate this by passing attributes as
keywords
to the w.element method - so it is necessary to use the slightly less
elegant form
w.element("meta", None, {"http-equiv":"contenttype",
"content":"text/html"})
I guess there is no way to avoid this - since the module relies on
pythons
way of handling keyword parameters...
/Jesper