Writing HTML
Stefan Behnel
stefan_ml at behnel.de
Mon Jun 2 15:19:54 EDT 2008
Ken Starks wrote:
> miller.paul.w at gmail.com wrote:
>> I've searched the standard library docs, and, while there are a couple
>> options for *reading* HTML from Python, I didn't notice any for
>> *writing* it. Does anyone have any recommendations (particularly ones
>> not listed on PyPI)?
>>
>> Thanks
>
> My approach is usually to write the data-load in XML rather than
> directly in HTML, and then use XSLT to produce the (X)HTML.
>
> You can do the whole of this, or just the second part, using
> FourSuite.
>
> If the XML, later, needs to be changed, you can use FourSuite
> to drill down to somewhere using XPath and change that
> particular part.
Or lxml, for that purpose, which also is a lot nicer for generating XML and
HTML in the first place.
http://codespeak.net/lxml/
Stefan
More information about the Python-list
mailing list