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/ -----------------------------------------
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
This is just *too* cool. All Zopistas should d/l beta 1 just to do this one thing..... Is the format specifically for Zope objects or is there a chance I could upload my own XML docs (suitably mangled of course) and have them slot into the database? The XML Document stuff is bloody good by the way - I'm creeping my way through the source to glean more information. :) Tone. ------ Dr Tony McDonald, FMCC, Networked Learning Environments Project http://nle.ncl.ac.uk/ The Medical School, Newcastle University Tel: +44 191 222 5888 Fingerprint: 3450 876D FA41 B926 D3DD F8C3 F2D0 C3B9 8B38 18A2
participants (2)
-
Paul Everitt -
Tony McDonald