is it possible to download a zip file containing just one xml file and then use it in iVIewer?

75 views
Skip to first unread message

Tulio

unread,
Jun 13, 2013, 12:15:46 PM6/13/13
to comman...@googlegroups.com

I have a 33MBytes XML file to load into iViewer and process it to show in a list (channel guide).

The problem is the xml file is large, daily updated, and I was wondering if it is possible to download as zip file (only 2MB) and then somehow manipulate inside iViewer.

I saw a phrase in GitHub that makes me dream: "This takes advantage of iViewer's ability to load zip files, and use any file in the zip as if it was a local file to the GUI." (Embedded HTML Demo)

thanks

Clayton Vicente

unread,
Jun 13, 2013, 3:13:09 PM6/13/13
to comman...@googlegroups.com
I tested with a xml file in a zip, i can see that IViewer get the file, but i dont know how i can get the .xml inside the .zip to parse.
If this work, get the .zip files and use files like .js and xml, i will be a happy guy today. Very useful.
I tested using CF.request, but maybe will work if i try with CF.loadAsset, but i just dont know how to get the file from a different URL then the .gui, because the file will be in a different place. CF Team ? 
If work, i have serious plans to use it.
Thanks
 


Date: Thu, 13 Jun 2013 09:15:46 -0700
From: tulio....@gmail.com
To: comman...@googlegroups.com
Subject: is it possible to download a zip file containing just one xml file and then use it in iVIewer?
--
You received this message because you are subscribed to the Google Groups "CommandFusion Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commandfusio...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jarrod Bell

unread,
Jun 13, 2013, 9:36:33 PM6/13/13
to comman...@googlegroups.com
I have uploaded a demo project to github which loads zip files via CF.request, extracts the files within the zip, then inflates (unzips) them, then uses the raw data to create JS objects you can work with.
Works for XML and JSON data.

In the example, its loading the ZIP files from the same path as the .GUI file, but you can easily change that to load the zip file from any web server.

Get it here:
https://github.com/CommandFusion/DemoUserInterfaces/tree/master/ZipDemo

Regards,

Jarrod Bell
CommandFusion
www.commandfusion.com


Clayton Vicente

unread,
Jun 13, 2013, 9:42:55 PM6/13/13
to comman...@googlegroups.com
Ok Jarrod let me tell you that this is because CF its and will continue been my preferred program. Congrats and very thanks. 


Date: Fri, 14 Jun 2013 11:36:33 +1000
From: jar...@commandfusion.com
To: comman...@googlegroups.com
Subject: Re: is it possible to download a zip file containing just one xml file and then use it in iVIewer?

Tulio

unread,
Jun 13, 2013, 9:44:26 PM6/13/13
to comman...@googlegroups.com, jar...@commandfusion.com
thanks thanks thanks, you made two guys very happy :-)
I will let Clayton test and post results, as he is the JS guy :-)

Clayton Vicente

unread,
Jun 13, 2013, 9:56:32 PM6/13/13
to comman...@googlegroups.com
Tulio is drinking much coffee this days, JS guy only for Jarrod, Barry, Florent...i am a beginner yet :)
Jarrod you made the code very simple to understand, very thanks. I will test tomorrow, but i am reading the code already.



Date: Thu, 13 Jun 2013 18:44:26 -0700
From: tulio....@gmail.com
To: comman...@googlegroups.com
CC: jar...@commandfusion.com
Subject: Re: is it possible to download a zip file containing just one xml file and then use it in iVIewer?

Clayton Vicente

unread,
Jun 15, 2013, 8:08:45 AM6/15/13
to comman...@googlegroups.com
Hi
Download the zip and unzip to get the xml works fine, but unfortunately its more fast to download a .xml with 3.6mb then a .zip with 488kb
I am posting a little test here, its just a little modification in the Jarrod´s example.
We can test downloading the .zip file from Dropbox and Mediafire, the .xml is in Dropbox.
Just for curiosity, why its more fast download the big .xml file ?



Date: Fri, 14 Jun 2013 11:36:33 +1000
From: jar...@commandfusion.com
To: comman...@googlegroups.com
Subject: Re: is it possible to download a zip file containing just one xml file and then use it in iVIewer?
testData.xml.zip

Jarrod Bell

unread,
Jun 15, 2013, 8:13:20 AM6/15/13
to comman...@googlegroups.com
The attachment was just the XML data, were you meaning to attach a guiDesigner project?

I am not sure why you would experience a faster download of a much larger file - but perhaps it's cached somewhere for your request somehow?


Regards,

Jarrod Bell
CommandFusion
www.commandfusion.com


Clayton Vicente

unread,
Jun 15, 2013, 8:18:50 AM6/15/13
to comman...@googlegroups.com
I am sleeping yet, sorry.
Well, you can see in the test, i really don't know why Jarrod, maybe you can help me to understand this better.
Two other people test this too, in different cities, same result. Get the big .xml its more fast.


Date: Sat, 15 Jun 2013 22:13:20 +1000
load.gui.zip

Jarrod Bell

unread,
Jun 15, 2013, 8:22:36 AM6/15/13
to comman...@googlegroups.com
OK so its not the download time that your script is testing, but the entire time including unzipping, etc - this might take some time as the unzipping is being handled in JavaScript, not native code. Would also depend on your compression level, etc.


Regards,

Jarrod Bell
CommandFusion
www.commandfusion.com


Clayton Vicente

unread,
Jun 15, 2013, 9:02:48 AM6/15/13
to comman...@googlegroups.com
Yesterday this was my first thought too, but unzip the file its very fast, milliseconds.
I modify the script to get the time just after the request, before the unzip action, same thing.
Clayton


Date: Sat, 15 Jun 2013 22:22:36 +1000
load.gui.zip
Reply all
Reply to author
Forward
0 new messages