| Author |
How to extract an xml file after matching content from a zip file using java
|
Raaja Gotluru
Ranch Hand
Joined: Mar 02, 2010
Posts: 84
|
|
Hi,
I am having a zip file with lot of xml files. I will be having some data in an excel sheet which I have to check with the xml files content and which ever xml file content matches with that data I have to extract that file only and store that in a folder. That is each record in that excel file matches with one xml file in the zip file.
Guide me to achieve this.
Thanking you.
--raaja.g
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12268
|
|
You will have to extract and test each XML document from the zip file. There is no way around it.
However, if your matching criteria are simple enough, you could use SAX or StaX parsing to check each document, much faster than building a DOM and using XPath for instance.
I suggest the first step is learning how to extract character streams from the zip file.
Bill
|
Java Resources at www.wbrogden.com
|
 |
 |
|
|
subject: How to extract an xml file after matching content from a zip file using java
|
|
|