libxml and gman's zipengine

BlitzMax Forums/Brucey's Modules/libxml and gman's zipengine

Rixarn(Posted 2010) [#1]
Hi!

I was wondering...with libxml is it possible to read an xml file from a password protected zip file generated by gman's zipengine?

Or.. if that aint possible, could it be readed from a TRamStream instead?

Thanks!


Pete Rigz(Posted 2010) [#2]
It is possible, I use this for my TimelineFX module. It's also possible with koriolis.zipstream module too.


Rixarn(Posted 2010) [#3]
Hi Pete,

I see... then i'm doing something wrong here. I have a zip file called "data.zip", inside the zip file there's an xml directory with a data.xml file.


local url:string = "zipe::data.zip::xml/data.xml::helloworld" 
Local doc:TxmlDoc = TxmlDoc.parseFile(url)
If doc = Null then Throw "Error"



But i keep getting error, any advice?

Thanks!


Pete Rigz(Posted 2010) [#4]
Try

local url:string = "zipe::data.zip::xml/data.xml::helloworld" 
Local doc:TxmlDoc = TxmlDoc.parseFile(loadtext(url))
If doc = Null then Throw "Error"



Rixarn(Posted 2010) [#5]
Thanks! It worked :) I had to use Txmldoc.parseDoc() instead but it did the job, thanks a lot.

By the way, just looked at your TimeLineFX and it looks great.