[Zope-xml] Upload an XML file from web
kapil thangavelu
kvthan at wm.edu
Tue Sep 17 14:48:28 EDT 2002
On Monday 16 September 2002 10:48 pm, Erwan Loisant wrote:
> Hello.
>
> I recently came to Zope and I need to get an XML file from user. That
> means user will not upload the file from Zope management interface but
> directly from the website I designed.
>
> I downloaded and installed ParsedXML, which seems to be a good product
> for XML management.
>
> I looked in the doc and I've seen a dtml manage_addFile() function,
> manage_addImage() function, and a function for each Zope base object.
>
> Is there such a method to add ParsedXML files ?
the generic way of adding products is,
context.manage_addProduct['ProductName'].manage_addProductFactoryName(args)
the actual factory name and args is idiosyncratic to the particular product, a
quick source inspection reveals the answer.
>Or is it better to
> upload it as file then parse it once it is a file object ?
depends on what you want to do with it. if you want to use various xml tech.
with it such as xpath/xslt than its probably better to keep it in a parsed
xml object (assuming the tool(s) for using those technologies support parsed
xml). personally, i'm an xml luddite, so i generally convert from xml to an
object model via sax.
hth,
kapil
More information about the Zope-xml
mailing list