• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

advice needed to translate bigger XML files above 2MB

 
rajareddya reddy
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am working on component that can translate XML files to other format likes EDI , text files etc.. .The limitation of this component is it can translate maximum 200kb xml files.

If I try to translate more than 200kb, applications which are using my component is going to HUNG state.

Can anybody suggest best industry approaches how to deal with BIG XML files more than 2 MB.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming you are presently working from a DOM in memory, the obvious answer is to go to an event oriented SAX or StaX approach.

This is likely to involve a lot more programming but should remove all size limitations.

You might find a "pipeline" toolkit such as ServingXML to be helpful. That site has examples of conversions like yours.

Please realize that:
If I try to translate more than 200kb, applications which are using my component is going to HUNG state.

does not really tell us what is going on - how are these applications supposed to use the output of your component?

Bill
 
aadhira sharma
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for share it with us.
 
Winston Gutkowski
Bartender
Pie
Posts: 10509
64
Eclipse IDE Hibernate Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rajareddya reddy wrote:Can anybody suggest best industry approaches how to deal with BIG XML files more than 2 MB.

Well, I can think of one: work out why your application needs to process such enormous files.

Frequently, it's simply laziness; often combined with the fact that usage has expanded over time, but nobody's actually bothered to go back and work out how the app could be refactored. Huge discrete inputs are often a symptom of neglect.

My 2 cents, for what it's worth.

Winston
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic