[Zope] Problems with XML import / export
Bradley McLean
bradm@ne.mediaone.net
Wed, 22 Dec 1999 12:04:29 -0500
I've got a large number of search-and-replace
style edits to do to many dtml-methods across
several folders. (I'm changing from a custom
tag I had developed to a standard tag now that
it supports the semantics I need).
This seemed like a great place to do an XML
export, edit the file, and do an import.
Unfortunately, for all but the most trivial
objects, I invariably end up with an XML file
that won't import, always due to the same
error: <object> tags without id attributes.
For example, I exported a folder that contains
10 dtml-documents, 1 dtml-method, and 6
sql-methods. Here's an excerpt from the
broken .xml file that zope output:
<item>
<key> <string id="2132.12" encoding="repr">_arg</string> </key>
<value>
<object>
<klass>
<global id="2132.13" name="Args" module="Shared.DC.ZRDB.Aquedu
ct"/>
</klass>
<tuple/>
<state>
<dictionary id="2132.14">
Now, before I did this export, I copy-and-
pasted the contents into a freshly created
folder, and did a database pack.
If I copy one or two objects into another
folder, it will work. If I delete a lot
of objects (down to one or two), a folder
will work. If I add back the same objects
by copying them one at a time from another
folder, it seems to work.
Anybody got any clues? This is making me
crazy.
-Brad