Hi,
I'm doing the same on my gadget, you can use the following for writing the
xml to the filesystem:
*function writeXmlToFile(filepath,filedata)
{
var fso, f;
debug.trace("entering writeXmlToFile" );
ForWriting = 2;
fso = framework.system.filesystem;
fso.CreateTextFile(filepath,true);
f = fso.OpenTextFile(filepath, ForWriting, true);
f.Write(filedata);
f.Close();
}*
filedata is a string representation of your DOM object.
A typical usage of this method with XMLHttpRequest would be:
*var req = new XMLHttpRequest();
[XMLHttpRequest negotiations...]
writeXmlToFile("c:\myfile.xml",req.responseText);*
Regarding the cache issue - I didn't faced this problem, but in a quick
google for *xmlhttprequest cache problem* this came up:
http://bytes.com/groups/asp/127209-xmlhttprequest-caching-problem
Hope this will help..
Enjoy & Good luck,
Meir.
On Sat, Mar 28, 2009 at 8:52 PM, woriworiwa <[email protected]> wrote:
>
> Hi,
>
> Today i wrote my first Desktop gadget that will retrieve data from a
> json file through Http and store the retrieved data on a text file.
> The first problem i faced was that the XMLHttpRequest caches the data,
> and i always receive the same result. to get around this i
> concatinated a random parameter to the request string so it will not
> be cached. is there a better way to do that?
> The other problem is saving this data to a file. i have searched the
> APIs and the group for such info and it seems like this function is
> not supported. does anyone know of a way to do that?
>
> Thank you for your help and it is really fun working with google
> APIs :)
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Desktop Developer Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Desktop-Developer?hl=en
-~----------~----~----~----~------~----~------~--~---