External script generates xml - how to turn it into an xml file object
I have an external script that generates an xml string - how do I turn that xml text into an zope xml file object ? 1. If the external script returns the xml as a string, zope doesn't like tags in the string. xml within xml issues, I guess 2. If I encode the < and > symbols in the xml returned by my script, then search and replace them back again - this search and replace only works for a DTML document and not a file object. Perhaps my script should generate a file instead, then I could import the file into an xml file object directly. But I want to do this programatically, not though a form file upload. thanks for any guru thoughts. -Andy Bulka
Andy Bulka writes:
I have an external script that generates an xml string - how do I turn that xml text into an zope xml file object ? What do you mean by an "zope xml file object"?
If you mean a "OFS.Image.File" object with "content_type='text/xml'" it should make no problems at all when the "file" parameter of "manage_addFile" is a string containing "<" or ">". Dieter
participants (2)
-
Andy Bulka -
Dieter Maurer