• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Huge XML

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI.,


I have an huge xml like 400 mb size..i want to parse the xml ,but in between i got memory out of bound exception..as it
very huge so how can I do that..do you want split the xml..?how to maintain this senario..?

Thanks
Kim.
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How are you parsing it? SAX should be able to handle it just fine.
 
Ranch Hand
Posts: 671
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mortin kim:
HI.,


I have an huge xml like 400 mb size..i want to parse the xml ,but in between i got memory out of bound exception..as it
very huge so how can I do that..do you want split the xml..?how to maintain this senario..?

Thanks
Kim.




As Ulf mention go with SAX. Spliting required to use xslt and will lead you to more development efforts and in turn leads you for budeting.
 
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
You neglect to mention what you have to do with the data. If you are processing simple records and don't need the whole monster in memory at one time, SAX is the way to go.

So - what do you have to do with the data?

Bill
 
Mortin kim
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI All.,
Thnks for the reply.
I am Using SAX parser...some XMLS are 1000MB I am getting exception while parsing..?hOw can I can fix this senario.

Thanks and regards
Hari.
 
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

I am Using SAX parser...some XMLS are 1000MB I am getting exception while parsing..?hOw can I can fix this senario



My crystal ball is in the shop for the 10000 vision checkup so I can't read your screen or log file to determine WHICH EXACT EXCEPTION you got.



The standard Java API provides methods for extracting useful information from SAX related exceptions - for example:



Bill
 
reply
    Bookmark Topic Watch Topic
  • New Topic