Where's a DOM builder that uses the Builder Pattern to ... build DOMs?
Stefan Behnel
stefan_ml at behnel.de
Tue Jan 5 03:16:17 EST 2010
Phlip, 04.01.2010 21:01:
> Not Hyp:
>
> I hope I'm wrong, but seems that DOMBuilder, found among the various
> xml.dom packages, cannot build DOM like this:
>
> var html = DomBuilder.apply();
>
> var form = html.FORM(
> html.DIV(
> html.INPUT({type : 'text', name : 'email'}),
> html.INPUT({type : 'text', name : 'password'}),
> html.INPUT({type : 'submit'}),
> )
> );
>
> Do anyone know any good DOM builder packages that do build DOM good
> like a DOM builder should?
You might be looking for something like this:
http://codespeak.net/lxml/lxmlhtml.html#creating-html-with-the-e-factory
Note that there are tons of ways to generate HTML with Python. A quick web
search (or a quick read on PyPI or the Python Wiki) should get you started.
Stefan
More information about the Python-list
mailing list