I have a medium sized archive (zipped roughly 140Mb). I need to access single xml-files only, as there are roughly 50.000 xml-files, I want to use the unz
-function to extract a single xml-file instead of unzipping the whole folder.
Using the approach proposed here, my code looks like this:
library(XML)
f.path <- "path to zip-archive/"
# establish a connection to the file
dat <- unz(paste0(f.path, "BKK-Download.zip"), filename = "lists/www_s100_bh8285_1_3.xml")
# trying to parse the xml code
xml.content <- xmlParse(dat)
# which returns
# Error in file.exists(file) : invalid 'file' argument
This question is very similar to this, but I want to extract only a single file instead of unzipping the 50k files.
Any ideas of how to fix this? Any help is much appreciated!
Appendix: You can find the dataset here (direct link) (source: Deutsche Bundesbank (website))