preferred XML method

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Mar 2004
Posts: 765
Reputation: Phaelax is on a distinguished road 
Solved Threads: 38
Phaelax Phaelax is offline Offline
Master Poster

preferred XML method

 
0
  #1
Jun 7th, 2007
Which would be the preferred, or more efficient, way to read in a 40mb XML file? I remember reading (awhile ago) there were different methods of parsing XML, some more efficient than others depending on the need. The entire file would eventually need to be loading into an array, so I don't really need to search the file for a specific entry at random but simply all of them.
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: preferred XML method

 
0
  #2
Jun 8th, 2007
You don't want to keep that much data in memory...

Use a SAX parser for large amounts of data, as it doesn't need to retain the data in between operations.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,628
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 468
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: preferred XML method

 
0
  #3
Jun 9th, 2007
If you are looking for a particular piece of information in that XML file, maybe this would interest you. Also take a look at this.
Last edited by ~s.o.s~; Jun 9th, 2007 at 3:24 pm.
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 41
Reputation: hussulinux is an unknown quantity at this point 
Solved Threads: 2
hussulinux hussulinux is offline Offline
Light Poster

Re: preferred XML method

 
0
  #4
Jun 10th, 2007
You could also try XALAN from apache. Its an open source parser. Available in Java and C++
Hussain Fakhruddin
Teks: http://www.teks.co.in
hussulinux at gmail dot com
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: preferred XML method

 
0
  #5
Jun 10th, 2007
Xalan won't solve his problems...
For one it's not an XML parser and also it won't limit his memory use to something reasonable...
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC