[Web-SIG] html dom like javascript ?

Chris McDonough chrism at plope.com
Thu Aug 17 18:59:32 CEST 2006


You probably want elementtree (http://effbot.org/zone/element-index.htm).

>
> Thanks for the rapid reply.  I am familiar with a number of these and
> have searched the web documentation but for the most part these appear
> to be parsers or things like:
>
> http://www.acooke.org/andrew/writing/python-xml.html#code
>
> That are xml centric and not html related.   I'm looking for something
> that is more html specific that contains all the options for any html
> widtget, like a form element with all of its options like style, css,
> and so forth.  In other words I dont want to have to write my own xml
> file with all the html tags and options.
>
>
>
> Jean-Paul Calderone wrote:
>> On Thu, 17 Aug 2006 10:10:47 -0400, seth <test at brightphoton.com> wrote:
>>> Is there a python library which is analogous to javascript for creating
>>> html/xhtml documents? e.g.:
>>>
>>>         hidden = document.createElement("input")
>>>         hidden.setAttribute("type", "hidden")
>>>         hidden.setAttribute("name", "active_flag_hidden_" + ctl)
>>>         if( dirtyArray[ctl].checked == true) {
>>>            hidden.setAttribute("value", 'N')
>>>                 } else {
>>>            hidden.setAttribute("value", 'Y')
>>>         }
>>>         document.forms['listForm'].appendChild(hidden)
>>
>> At least fifty.  The DOM API is heavily standardized with hundreds of
>> implementations in dozens of languages.
>>
>> http://python.org/doc/lib/module-xml.dom.html
>>
>> Jean-Paul
>>
>
> _______________________________________________
> Web-SIG mailing list
> Web-SIG at python.org
> Web SIG: http://www.python.org/sigs/web-sig
> Unsubscribe:
> http://mail.python.org/mailman/options/web-sig/chrism%40plope.com
>
>



More information about the Web-SIG mailing list