• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Split Big XML into smaller ones by size

 
GaneshSg Sundaresan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone,

Need your valuable suggestions on splitting big XML file dynamically in Java into smaller ones by size.

Before starting parsing of the xml we need to check the file size and should split the file so that each file is not more then 10 MB.

Also the XML should be well formed.

If you are aware of any better framework / better way of doing this please let me know.

Thanks,
Ganesh
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's easy enough to split a file into smaller pieces, but splitting an XML file into smaller pieces which are themselves well-formed XML files? Can't be done.

But perhaps your XML documents have some specific features which allow you to split them into a set of sub-documents which, with little modification, could be made into well-formed XML files?

As for doing the split before you start parsing, I wouldn't recommend that. If your idea of a split is even possible, it should be done by software which understands the rules of XML, and that means a parser.
 
GaneshSg Sundaresan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul.

Are you aware of any framework that does that?

Thanks,
Ganesh
 
Harikumar Maryadha
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ganesh,

i am also having same requirement . did you get information like how we can do it ?

Thanks,
Hari

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic