Saving downloaded zip file: cpgz file type

Keith Clarke keith.clarke at
Mon Jun 6 13:44:07 EDT 2011

Thanks for the response Mark, the tip on binfile and the possible limitations of revXML. 
This particular XML file isn't too complex. So, although I have the STSXML libary available, I'll first try extracting the zip file node string as a text chunk.
On 6 Jun 2011, at 16:22, Mark Schonewille wrote:

> Hi Keith,
> Your zip file is corrupt. First of all, replace "file:" with "binfile:".
> It is possible that the revXML external can't cope with binary data. In that case, your zip file will stay corrupt and you'll have to retrieve the data manually.
> --
> Best regards,
> Mark Schonewille
> Economy-x-Talk Consulting and Software Engineering
> Homepage:
> Twitter:
> KvK: 50277553
> New: Download the Installer Maker Plugin 1.6 for LiveCode here
> On 6 jun 2011, at 17:03, Keith Clarke wrote:
>> Hi folks,
>> I'm downloading a zip file via a web service call - the file is embedded as a long string within the ...<result><zipFile> node of the XML file, accompanied by a set of nodes that name the (xml text) files that I should find within the zipped payload. 
>> So, I save this string out to to disk with...
>> put revXMLNodeContents(tTree, tResultNode & "/zipFile/") into URL ""
>> This creates a zip file on disk OK, but when when I open the archive, instead of a list of files, I get a .cpgz file - and attempting to open this causes some weird recursion. (I get the same result if I use the URL 'binfile' prefix.)
>> What am I doing wrong here - am I using the correct syntax or failing to encode/decode for the zip file definition string?
>> Best,
>> Keith..

More information about the Use-livecode mailing list