Tim Arnold wrote: > hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop to > create CHM files. That application really hates xhtml, so I need to convert > self-ending tags (e.g. <br />) to plain html (e.g. <br>).
This should do the job in lxml 2.x:
from lxml import etree
tree = etree.parse("thefile.xhtml")
tree.write("thefile.html", method="html")
http://codespeak.net/lxml
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
