[Twisted-Python] How to save the content(string) of a DOM node into a file?
bob at redivi.com
Mon Sep 15 21:15:00 EDT 2003
On Monday, Sep 15, 2003, at 20:41 America/New_York, Chris Armstrong
> On Mon, Sep 15, 2003 at 11:17:44AM -0700, suneetha velicheti wrote:
>> I wanted to save the content of a DOM node into a file and want my
>> browser to prompt me with "save as" window. I already set the browser
>> preferences. Right now the content of the node is just displaying in
>> browser window. Instead of that I want to promt the user to save that
>> content into a file with "save as" option window. Are there any DOM
>> methods to do this?
> see the "write[pretty]xml" method.
I think he's talking about rigging the Content-Type header so that the
browser thinks it doesn't know how to display the content, and will
prompt the user to save the document. It really has nothing to do with
DOM at all.
In your render method.
More information about the Twisted-Python