reading File Objects from Python Scripts and External Methods
This relates to finding a workaround to my previous problem. I can create File objects with content='text/xml' using essentially the same program I was trying to use to write ParsedXML. The next problem is how to read them, again from an External Method or Python script, as a string. The plan is to convert the XML back into the simple markup to allow for editing. Of course, I discovered that the XML renders to nothing when evaluated using a <dtml-var .. >. :-(
On Monday 15 April 2002 01:24, Dennis Allison wrote:
This relates to finding a workaround to my previous problem. I can create File objects with content='text/xml' using essentially the same program I was trying to use to write ParsedXML.
The next problem is how to read them, again from an External Method or Python script, as a string. The plan is to convert the XML back into the simple markup to allow for editing.
Of course, I discovered that the XML renders to nothing when evaluated using a <dtml-var .. >. :-(
o = context.myfile content = str(o) print content return printed ...or... o = context.myfile content = str(o) return ParseSomeText(content) # i.e. do something to the file content
participants (2)
-
Dennis Allison -
Peter Bengtsson