A question about python and xml

H

Holden

Hello everyone I heard this was a good community to go too for help
and advice. I want to make a web site that uses the python programming
language which I am VERY new at. This website would store simple data
such as names in a form. At first I wanted to use mysql to store the
data but I want to export the data using xml.

So say if a user logged in they would be able to store there basic
information in an xml file and download it whenever. Is that possible
using XML and Python. I am sorry if this post doesn't make much sense
but any advice would be greatly appreciated. You can also e-mail me if
you need further information or clarification.

Thanks

Holden
 
S

Stefan Behnel

Holden said:
I want to make a web site that uses the python programming
language which I am VERY new at. This website would store simple data
such as names in a form. At first I wanted to use mysql to store the
data but I want to export the data using xml.

So say if a user logged in they would be able to store there basic
information in an xml file and download it whenever. Is that possible
using XML and Python. I am sorry if this post doesn't make much sense
but any advice would be greatly appreciated. You can also e-mail me if
you need further information or clarification.

Generating XML from your data shouldn't be too hard once it's in a database.
The harder part is getting it in there through a web interface. I would look
at a dedicated web framework like Django first:

http://www.djangoproject.com/

Stefan
 
J

J. Cliff Dyer

Hello everyone I heard this was a good community to go too for help
and advice. I want to make a web site that uses the python programming
language which I am VERY new at. This website would store simple data
such as names in a form. At first I wanted to use mysql to store the
data but I want to export the data using xml.

So say if a user logged in they would be able to store there basic
information in an xml file and download it whenever. Is that possible
using XML and Python. I am sorry if this post doesn't make much sense
but any advice would be greatly appreciated. You can also e-mail me if
you need further information or clarification.

Thanks

Holden

A general question will only get you a general answer, but yes, it's
very possible.

You'll want to look into the cgi module (in the standard library)for
basic, ground level server/browser communication. You might also be
interested in using a web framework, for keeping your site design clean
and manageable. I recommend Django from my own experience, but you
might also look into turbogears, pylons, webpy, or any of a number of
other well-regarded options. The downside to using a framework is that
it's another set of things to learn, which, if you're just starting out
with python, might be a bit much to chew, but they can be very helpful
with maintenance down the line.

For XML processing, lxml.etree or ElementTree should suit your needs.
ElementTree is included in the standard library of recent versions of
python, though lxml is easily downloadable, and adds a couple bells and
whistles. There are other options available, but those are
straightforward to use, and well designed.

Good luck with your site.

Cheers,
Cliff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,108
Latest member
AlbertEste
Top