944,144 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1119
  • Java RSS
Jun 7th, 2007
0

preferred XML method

Expand Post »
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.
Similar Threads
Reputation Points: 92
Solved Threads: 51
Practically a Posting Shark
Phaelax is offline Offline
856 posts
since Mar 2004
Jun 8th, 2007
0

Re: preferred XML method

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.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Jun 9th, 2007
0

Re: preferred XML method

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.
Super Moderator
Featured Poster
Reputation Points: 3241
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,873 posts
since Jun 2006
Jun 10th, 2007
0

Re: preferred XML method

You could also try XALAN from apache. Its an open source parser. Available in Java and C++
Reputation Points: 10
Solved Threads: 2
Light Poster
hussulinux is offline Offline
41 posts
since Feb 2007
Jun 10th, 2007
0

Re: preferred XML method

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...
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: java implementation
Next Thread in Java Forum Timeline: java calendar SWING





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC