On 4 November 2013 21:07, Amit Sethi <amit.pureene...@gmail.com> wrote:
> I ended up using method=html for writing the xml.
>
> tree.write(filename, encoding="utf-8", xml_declaration=True, method='html')
>
> I am not sure if there are going to be any problems with this but for
> the time being my nosetests seem to be working fine

I would not do that at all. There are subtle differences between HTML
and XML, e.g., HTML allows tags that are not explicitly closed with
</tag>. Try a sub-element with the <img> or <input> tag. In general,
valid HTML is not necessarily valid XML, and vice versa. The bugs
that such an assumption might exercise can be subtle and hard to
catch.

Regards,
Gora
_______________________________________________
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers

Reply via email to