I have a zip file containing folders which in turn contains xml files I would like to parse. I have the content as ZipEntry objects and my parser takes InputSource objects.
In the translation i keep messing up and I get the following error message:
I have tried to locate the problem and it seems to come from the following:Code:Exception in thread "main" java.io.FileNotFoundException: metadata\coreProperties.xml (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown Source) at java.io.FileReader.<init>(Unknown Source) at StealsMain.main(StealsMain.java:90)
Here fileName is the path to the zip file and g2 is the path inside the zip file.Code:String currentFile = fileName + "/" + g2; File curr = new File(currentFile); System.out.println(curr.toString()); System.out.println(curr.exists());
the first System.out.println gives the correct location of the file:
/.../My Documents\FilB.slx\metadata\coreProperties.xml
But the second claims the file does not exist, which is why I cant pass it to the parser (after making it an inputsource).
How can I go from zipEntry to file object?




Reply With Quote
