Validating HTML from Python
Magnus Lycka
magnus at thinkware.se
Tue Sep 25 19:20:29 EDT 2001
I'm currently writing some programs that produce HTML.
I'd like to validate the HTML in my unittests.
What is the simplest solution for that?
Primarily, I just need something that complains unless a
string is a correct HTML 4.0 document. It seems that it should
be possible to do this in a simpler way than by writing a
script that uploads the string to w3c's validator and
then parses the resulting file for error messages...
Secondly, I suppose it would be useful to use SAX etc
to check that the content of the files follow some of
my expectations, but that's not my primary concern.
This doesn't have to be a "pure python" solution as
long as it's simple to access from python, and works
on Windows and Linux.
TIA
/Magnus
--
Magnus Lyckå | Älvans väg 99 | magnus at thinkware.se | tel: 070-582 80 65
Thinkware AB | 907 50 UMEÅ | www.thinkware.se | fax: 070-612 80 65
More information about the Python-list
mailing list