Python script to get the data from the flex application

Posted by nimmyliji on Stack Overflow See other posts from Stack Overflow or by nimmyliji
Published on 2010-03-31T05:15:57Z Indexed on 2010/04/01 16:23 UTC
Read the original article Hit count: 456

Filed under:
|
|

Hi,

I am making a simple Python CGI script that collects data(in xml format) from a flex application and I want to insert it into the mysql database .

In perl The script is looks like the following...

my @samplexml=$cgi->param("Items");

my $data=$xml->XMLin("@samplexml");

foreach my $e(@{$data->{Group}})
{
   my $sample="Insert into details(title,Parent,Istreeitem) Values('$e->{title}','$e->{Parent}','$e->{IsTreeItem}')";
   my $sam=$dbo->prepare($sample);
   $sam->execute();
}

But I want to know how to write these codes in pytrhon script.... Any one can help me?

Thanks in advance. Nimmy.

© Stack Overflow or respective owner

Related posts about python

Related posts about cgi