Python XML and tables using math
flebber.crue at gmail.com
Mon Aug 16 12:11:24 CEST 2010
On Aug 16, 4:00 pm, Stefan Behnel <stefan... at behnel.de> wrote:
> flebber, 16.08.2010 05:30:
> > I am looking at a project that will import and modify an XML file and
> > then export it to a table. Currently a flat file table system should
> > be fine.
> > I want to export the modified data to the table and then perform a
> > handful of maths(largely simple statistical functions) to the data and
> > then print out the resultant modified tables.
> > I was planning on using Python 2.7 for the project.
> > Has anyone used a guide to acheive something similar? I would like to
> > read up on it so I can assess my options and best methods, any hints
> > or tips?
> That can usually be done in a couple of lines in Python. The approach I
> keep recommending is to use cElementTree (in the stdlib), potentially its
> iterparse() function if the file is too large to easily fit into memory,
> but the code won't change much either way.
> You might want to skip through this list a bit, similar questions have been
> coming up every couple of weeks. The responses often include mostly
> complete implementations that you can borrow from.
okay I found http://effbot.org/zone/celementtree.htm so I will have a
read through there.
I have been creating an every expanding macro/VBA project in Excel and
due to slightly changin source document - the header order changes -
it causes the project to crash out.
I was hoping python and XML may be a bit more robust.
More information about the Python-list