Results 1 to 3 of 3
- 11-24-2010, 04:03 PM #1
Member
- Join Date
- Nov 2010
- Posts
- 16
- Rep Power
- 0
- 11-27-2010, 01:25 AM #2
i would guess because we nee the xml file to be well formed still ? that we would want to parse the xml file looking for the start and end tags , and perhaps after reading so many tags, cause the file to be saved and create a new file to write to at the end of the next tag.
The reader might use something such as the StAX API. And the actual implementation depends on how your XML is structured and how you plan to read back in the split XML files. You might have to invent a new top level xml root tag in each split file to not cause the XML document structure to be broke. This would have to be parsed out (ignored) when reading each of the split pieces later.
If you plan on re-assembling all of the pieces before trying to parse each XML file on its own then you might be able to just use simple line based splitting, which attempts to split the file after the given number of bytes or lines has been read, irrespective of the if it is at the natural end tag.
- 02-07-2011, 09:34 AM #3
Member
- Join Date
- Jul 2009
- Posts
- 26
- Rep Power
- 0
Similar Threads
-
post of large xml file on third party webservices
By enggvijaysingh@gmail.com in forum XMLReplies: 6Last Post: 11-16-2010, 03:03 PM -
Split wav file
By evan_earnest in forum New To JavaReplies: 7Last Post: 01-24-2010, 05:32 AM -
How to split a file into 2?
By syntrax in forum New To JavaReplies: 3Last Post: 09-26-2009, 06:28 AM -
Help! trying to make JAR file for very large project
By tacopalypse in forum EclipseReplies: 0Last Post: 04-25-2009, 10:18 PM -
how to split a file
By nagaraaju in forum New To JavaReplies: 0Last Post: 03-14-2008, 08:45 AM


LinkBack URL
About LinkBacks

Bookmarks