• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Parsing huge XML file(>65 mb)

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You probably want to check out vtd-xml for parsing large XML files...

http://vtd-xml.sf.net
 
Put the moon back where you found it! We need it for tides and poetry and stuff. Like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic