Hei..i am novice to programming. How to generate beautiful html pages from a text file. My idea is to generate XML first and then generate it to html. Generated html page should contain all the information that the text file contains..like tables,pics,body,headings. I dont have a clue what to do after i read XML file using 'open'. plz help.

8 Years
Discussion Span
Last Post by pythopian

from xml.sax.saxutils import XMLGenerator

I have no experience with the XMLGenerator, but I know it is used to create xml files.


Use any of the known markup languages to write the text file (reStructuredText, MarkDown, Kiwi ...) and use the corresponding tool to convert it to HTML (Docutils, MarkDown for Python, http://www.ivy.fr/kiwi/). You can also use those tools' API to integrate them in your own app. You don't need no XML step in between.

Edited by pythopian: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.