[Zope] Help! Accessing product constructors & methods programmatically

Oliver Bleutgen Oliver Bleutgen <myzope@gmx.net>
Sat, 2 Dec 2000 15:18:56 +0100


> Hello, Zopers--

> I'm fairly new at this, so I apologize if this is a dumb question.

> Anyway, I've been looking for a way to do a bulk upload of XML
> documents from a 	local directory. So I need a method (either
> DTML or Python is fine with me) that would build a list of files and
> create an XML Document object from each one. I have tried a
> variety of different approaches, but I can't find a way to access the
> XMLDocument.add() method.

Have you looked at load_site.py? It is included in the zope-distribution
or can be found at http://www.zope.org/Members/itamar/load_site 

It doesn't do XMLDocuments, but I found it a great help in figuring
out how to inject a bunch of external files into zope. I guess you 
just have to change the relevant lines to create XMLDocuments instead
of DTML-ones.


cheers,
oliver