I am developing an application in which I am getting a zipped XML file from web service.
Now I need to unzip it and I have to parse it. How can I unzip an XML file coming from web service??? Is it necessary to save unzipped file (after unzipping) before taking it to parse or is there a code which gives unzipped file directly without saving it to documents directory?
Code for this is helpful.
Thanks in advance..
Related
I want to download a zip file from this website, unzip it and then show it into an excel file.
http://www.belgianfootball.be/nl/downloads-competities
With which component can I do this?
You can use the tHTTRequest component.
https://help.talend.com/display/TalendOpenStudioComponentsReferenceGuide521EN/14.11+tHttpRequest
Here you can find a nice guide:
https://www.talendbyexample.com/talend-thttprequest-component.html
When i upload TCPDF library files to live server, the file tcpdf_fonts.php from tcpdf/include folder dissapears .. any idea of why ?
The file tcpdf_fonts.php has been blaklisted by the hosting company.
Requesting for include it in a whitelist (solved).
Now that google chrome handles zip files, basically, is there a way from inside a chrome app to get the files, and the contents of the files in a zip archive? From the user end, a zip file is mounted as a drive, containing the contents, but from the app end, the zip file is just a file. Is there a way from the app to "mount" the file, get the mount point and enumerate the contents and inflate them?
Nope, there are no particular APIs exposed that would allow this.
You will need to include your own ZIP engine - be it in JavaScript or in (P)NaCl. Then you can work with HTML Filesystem to hold inflated files while you work with them.
I have a file upload page that takes a file and parses it.
Order of Events
user uploads file
uploaded file gets copied
copied file gets it's encoding checked, with CPDetector
determined encoding from the copied file is used to parse the original uploaded file
FileNotFoundException on Solaris Test Server during BufferedReader creation.
copied file is deleted
uploaded file is parsed/verified
parsed data is saved to a database
uploaded file is deleted (I can't remember if I'm doing this or Tomcat is.)
The Whole process works on my Windows 7 workstation. As noted above it does not work on my Solaris Test Server. Something(I Suspect Tomcat) is deleting the uploaded file before I can finish parsing it.
I've watched the directory during the process and an uploaded file does indeed get created, but it lasts less than a second before being deleted. Also It's supposed to go into /opt/tomcat/ but seems be getting created in the /var/opt/csw/tomcat6/temp/ directory instead.
Thanks for any help
I realize it's probably bad form to answer my own question like this but I wanted to leave this here in-case it helps someone else.
The Problem turned out to be How I was accessing the files.
I had hard-coded file paths, for windows, and Database loaded ones for the test server.
I switched those to using System.getProperty("catalina.home")+"/temp/" + filename
I'm also copying the temp file a second time so I end up with:
Order of Events (changes are in bold)
user uploads file
uploaded file gets copied
copied file gets it's encoding checked, with CPDetector
uploaded file gets copied again to ensure a copy survives to be parsed
determined encoding from the copied file is used to parse the original uploaded file
copy used for encoding detection is deleted
copy for parse is parsed/verified
parsed data is saved to a database
parsed file is deleted.
uploaded file is deleted (I'm not sure if I'm doing this or Tomcat is.)
I am having a lot of issues trying to automate downloading from an ftp site. I know the folder the file will be in, and I know that it will be a .zip file. However I do not know what the files will be named.
So I have code that works if I know the file name...for example:
$sourceuri = "ftp://myFtpSite/test/myZipFile.zip"
I would like to be able to use wildcards in this string so it will recongize any zip file. So I could write something like
$sourceuri = "ftp://myFtpSite/test/_.zip"
and it would download any zip file in that folder.
I know this question is ancient, but have you considered just using the console app ftp.exe? You can build a text file with commands (such as "mget *.zip" to retrieve all .zip files) and automate the process.
ftp -s:filename