A question about python and xml

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Holden

    A question about python and xml

    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
  • Stefan Behnel

    #2
    Re: A question about python and xml

    Holden wrote:
    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:

    The web framework for perfectionists with deadlines.


    Stefan

    Comment

    • J. Cliff Dyer

      #3
      Re: A question about python and xml

      On Fri, 2008-05-09 at 08:39 -0700, Holden wrote:
      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


      Comment

      Working...