bryan rasmussen top-posted:
On Thu, Apr 24, 2008 at 9:55 PM, Stefan Behnel [EMAIL PROTECTED] wrote:
from lxml import etree
tree = etree.parse(thefile.xhtml)
tree.write(thefile.html, method=html)
http://codespeak.net/lxml
wow, that's pretty nice there.
Just to know: what's
Stefan Behnel wrote:
bryan rasmussen top-posted:
On Thu, Apr 24, 2008 at 9:55 PM, Stefan Behnel [EMAIL PROTECTED] wrote:
from lxml import etree
tree = etree.parse(thefile.xhtml)
tree.write(thefile.html, method=html)
http://codespeak.net/lxml
wow, that's pretty
bryan rasmussen [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I'll second the recommendation to use xsl-t, set the output to html.
The code for an XSL-T to do it would be basically:
xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
version=1.0
xsl:output
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).
Seems simple enough, but I'm having some trouble with it. regexps trip up
because I
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).
Seems simple enough, but I'm having some trouble with it. regexps
Tim Arnold [EMAIL PROTECTED] writes:
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).
Seems simple enough, but I'm having some
Gary Herron [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
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.
Arnaud Delobelle [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Tim Arnold [EMAIL PROTECTED] writes:
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.
Arnaud Delobelle wrote:
Tim Arnold [EMAIL PROTECTED] writes:
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).
Seems simple enough,
-Original Message-
From: [EMAIL PROTECTED] [mailto:python-
[EMAIL PROTECTED] On Behalf Of Tim Arnold
Sent: Thursday, April 24, 2008 9:34 AM
To: python-list@python.org
Subject: convert xhtml back to html
hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop
On 2008-04-24 19:16, John Krukoff wrote:
-Original Message-
From: [EMAIL PROTECTED] [mailto:python-
[EMAIL PROTECTED] On Behalf Of Tim Arnold
Sent: Thursday, April 24, 2008 9:34 AM
To: python-list@python.org
Subject: convert xhtml back to html
hi, I've got lots of xhtml pages that need
I'll second the recommendation to use xsl-t, set the output to html.
The code for an XSL-T to do it would be basically:
xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0
xsl:output method=html /
xsl:template match=/xsl:copy-of select=///xsl:template
/xsl:stylesheet
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
wow, that's pretty nice there.
Just to know: what's the performance like on XML instances of 1 GB?
Cheers,
Bryan Rasmussen
On Thu, Apr 24, 2008 at 9:55 PM, Stefan Behnel [EMAIL PROTECTED] wrote:
Tim Arnold wrote:
hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop to
14 matches
Mail list logo