sending out XML from python.

Peter Hansen peter at engcorp.com
Tue May 11 22:54:11 EDT 2004


Sean Berry wrote:

> I am going to be doing some programming with a Flash programmer in my
> company.  Most of the online docs about integrating Flash with another
> language use PHP.  I am not a fan of PHP.
> 
> What I would really like to do is use Python to create data in the form of
> XML to send back to Flash, since Flash MX has the ability to easily parse
> XML to get variables and values.
> 
> I have done some reading on XML in Python, but only stuff I have seen has
> been geared toward reading in XML data, not spitting it out.
> 
> Is there a module for doing this?  I know that I can make something that
> would work, but wondered if it is already done.

It's often the case that the simplest thing is just to build
up the strings from scratch.  Constructing an awkward
in-memory representation (ala DOM) just to serialize it
immediately can be a trying experience.

How complicated will your XML be?

-Peter



More information about the Python-list mailing list