[Zope] FYI: More cool XML in Zope

Paul Everitt Paul@digicool.com
Sat, 24 Jul 1999 12:05:08 -0400


Howdy folks.  Besides Amos' exciting XML Document download, there's
something that snuck into beta1.  I got back yesterday afternoon from
being out all day to find out that XML import/export is actually *in the
interface*.  There's now an option on the import/export view of a folder
to export as XML.  Even _I_ wasn't aware that it finished in time for
beta1.

Better still, it was much, much more than I thought.  If the contents of
an object appear to be a displayable string, it is exported as a string.
Thus, you can actually dump the contents of a tree, search and replace
all the DTML Documents, then re-upload it.

To get an idea, get beta 1, go to the QuickStart, click on
Import/Export, and select "Download to local machine" and "XML format".
If you have IE5, you'll actually get a parsed, colorized, and
collapsible/expandible display in the browser window.

Here's what a snippet looks like:

<?xml version="1.0"?>
<ZopeData>
  <record id="15">
    <pickle>
      <tuple id="15.1">
        <global id="15.0" name="Folder" module="OFS.Folder"/>
        <none/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary id="15.2">
        <item>
            <key> <string id="15.3"
encoding="repr">standard_html_header</string> </key>

Notice something?  The elements are (effectively) Python types.  The
import/export machinery puts XML down at the pickle level.

--Paul

Paul Everitt       Digital Creations
paul@digicool.com  540.371.6909
-----------------------------------------
The Open Source Zope application server
http://www.zope.org/
-----------------------------------------