Load huge xml file
- From: Zibi <z1b1@xxxxxxxxx>
- Date: Tue, 14 Apr 2009 20:48:47 +0200
Hello,
I'm looking for solution/strategy how load big xml file ( 100 MB).
In simplification my xml look like:
<root>
<element1>...</element1>
<element1>...</element1>
<element2>...</element2>
<element2>...</element2>
</root>
One element's <element1> ... </element1> size is from few bytes to 5 MB
and has another elements itd.
After load entire element I can process it - load to DB.
Elements are quite complicated I have XSD for entire XML.
At this moment I'm thinking about two steps:
1. Parse xml using Stax, after read entire element rewrite to temorary file.
2. Load temporary file with one element using Xstream/JAXB
I would like avoid load all into memory because size of XML file can increase in future.
What do You think about this ?
Thanks in advance
zibi
.
- Follow-Ups:
- Re: Load huge xml file
- From: bugbear
- Re: Load huge xml file
- From: Albert
- Re: Load huge xml file
- From: Roedy Green
- Re: Load huge xml file
- From: lord . zoltar
- Re: Load huge xml file
- From: Bojan
- Re: Load huge xml file
- Prev by Date: Re: Create a JAVA Client/Server app in 5 Minutes
- Next by Date: Re: Create a JAVA Client/Server app in 5 Minutes
- Previous by thread: JVM restart on Tomcat
- Next by thread: Re: Load huge xml file
- Index(es):
Relevant Pages
|