| Author |
How can I split one XML file into Two files
|
BalaiahRaju ChamarthiRaju
Greenhorn
Joined: Sep 18, 2007
Posts: 13
|
|
Hi, I have a task need to split one xml file into two files. this is because of my application supports only 5MB xml to load.. rarely I am getting 10MB files also, such scenarios my application is not able to load the file. Please give me light on this whether is there any tool or any mechanism to split XML file. Thanks in Advance
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3268
|
|
|
Well you could write a piece of custom Java which split the file if if gets beyond a certain file size. The tricky part will be deciding where to split that file and whether or not you need to merge that file back together...
|
Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
|
If you want to extract a subset of the file (a generalization of your "split one file into two files"), a common way to do that is with a SAX filter. Google the expression for examples.
|
 |
 |
|
|
subject: How can I split one XML file into Two files
|
|
|