wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes Parsing huge XML file(>65 mb) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Parsing huge XML file(>65 mb)" Watch "Parsing huge XML file(>65 mb)" New topic
Author

Parsing huge XML file(>65 mb)

sudeep jha
Greenhorn

Joined: Sep 05, 2007
Posts: 19
Hi all,
I am thinking of using SAX parser to parse the XML file.
Can anyone suggest better approach for this?
Also,eclipse is getting crashed.So, is there anyway that I can see the visual representation of XML file i.e node-tree?

Thanks.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
This question comes up all the time - I really should have a canned answer - anyway,
the answer depends on the following:

What do you need to do with the XML document?

Display it
Modify it
Extract specific bits without modifying it
Convert some or all of the contents to a new document format - XML? HTML? PDF?

Please amplify.

Personally I use XML SPY to look at large XML documents nicely formatted - I think they have a free sample version.

Bill
sudeep jha
Greenhorn

Joined: Sep 05, 2007
Posts: 19
William Brogden wrote:This question comes up all the time - I really should have a canned answer - anyway,
the answer depends on the following:

What do you need to do with the XML document?

Display it
Modify it
Extract specific bits without modifying it
Convert some or all of the contents to a new document format - XML? HTML? PDF?

Please amplify.

Personally I use XML SPY to look at large XML documents nicely formatted - I think they have a free sample version.

Bill



I want to Extract specific bits without modifying it
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Ok, that is one of the simpler problems!

You can use SAX style processing which will be fast and use little memory but requires thinking in terms of events. With SAX it is up to you the programmer to track the "current" location the parser is working on so you will know when the bits you need are about to be parsed.

Bill
Jamie Zhang
Greenhorn

Joined: Jul 31, 2009
Posts: 9
You probably want to check out vtd-xml for parsing large XML files...

http://vtd-xml.sf.net
 
wood burning stoves
 
subject: Parsing huge XML file(>65 mb)
 
Similar Threads
Can I have both DTD and schema delcaration for single XML file?
java.util.Properties loadXMLFile()
Reading a xml file
Updating a xml file inside a jar file
What is ibm-web-ext.xmi