I have a big xml document which contains 67 individual documents of the same kind. I need to break this big xml into individual documents and save them as individual xml docs. I am new to Java and was wondering if there is a way to do this using Java.
posted 9 years ago
Hi, welcome to the ranch!
You could try to do this with String manipulation, but it's safer to parse the big doc, construct smaller ones in memory, then write them to disk. There are several good parsing options. I'd probably favor a DOM parser for this because it will have methods to easily copy or write out your individual documents. Scroll on down to the XML and Related forum and ask for introductory tips to parsing.
Hope that helps!
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Destroy anything that stands in your way. Except this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads