[Zope] Exporting zodb data (Urgent)

Sukhwinder Singh ssruprai@hotmail.com
Sun, 29 Jun 2003 01:01:38 +0530


> I'm a Zope newbie. It would be far quicker for me to figure out the XML
> and write a crude parser in PHP, compared to learning how to export the
> data the "Zope way".

This was the first thing I tried. Not using zope's exported xml. Just try to
export xml using zope and you will know why it doesn't make much sense to
me. But person who originally wrote that application also wrote an external
method to export the objects' data. Because he knew what objects were there
and their fields. But that is more than year old and application was changed
too much after that.

I used his script to export data and tried to write create table and insert
into statements using java and xml. But problem is that xml script doesn't
export all data. For some fields, where there is no value, node for that is
either not created or an empty child node is created. So when I try to use
loops to extract data and then write insert into statements, insert into
statements result in field count error. For example if an object had 25
fields, sometimes 20 and sometime 25 or less fields are created. There are
so many tables so I cannot hard code values for each table. Even if I tried
to hard code values by counting when looping I don't know how many actual
fields are there. Also wrong data is inserted in fields when any empty value
is skipped by that python script.

So this is the problem when using XML.

----- Original Message -----
From: "Matthew Platte" <plattem@inetnebr.com>
To: "Sukhwinder Singh" <ssruprai@hotmail.com>
Sent: Friday, June 27, 2003 9:41 PM
Subject: Re: [Zope] Exporting zodb data (Urgent)


> Sukhwinder Singh wrote:
> > Hello,
> >
> >     (I posted this question to zope-db@zope.org
> > <mailto:zope-db@zope.org> but no one replied so I am posting it here as
> > it is urgent.)
> > I have a web application which is written by some other person using
> > zope/zodb/python. Now client wants to write this application using
> > php/mysql. But existing data stored in zodb database has to be exported
to
> > mysql database. Zodb uses fileStorage to store data. I have tried zope's
xml
> > export but that doesn't make any sense to me.
> >
>
> I'm a Zope newbie. It would be far quicker for me to figure out the XML
> and write a crude parser in PHP, compared to learning how to export the
> data the "Zope way".
>
> XML is your friend.
>
> --
> -------^.^--
> Matthew Platte
> Lincoln, Nebraska
>
>