XML DOM to JavaScript

Paul Prescod paulp at ActiveState.com
Wed Oct 25 17:19:18 EDT 2000


OlavB at yahoo.com wrote:
> 
> ...
> In ColdFusion there is
>  this WDDX framework which converts the CFML DOM
>  to Javacript statements which generates a
>  similar structure in JavaScript.
>  (WDDX seems to be intended as a standard for
>  this kind of things, but I haven't found any
>  references to WDDX and Python)

This should help:

http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/xml/xml/marshal/wddx.py?cvsroot=pyxml

I don't know how much use (i.e. testing) it has received so you may need
to tweak it. 

Also, you could generate Javascript from Python using standard string
processing and XML processing techniques. For instance, walk the DOM,
going from each node to its children nodes, generating a big long string
and then write it to a file.

 Paul Prescod




More information about the Python-list mailing list