I am trying to find out using the DOM API if I could recursively parse an XML, based on certain tag name and split it into multiple XMLs. These XMLs (String datatype) will be fed into methods for further processing. I am using JDK 1.4.2. Here's a sample XML -
Once you have a DOM, you have already parsed the XML document. But that's just terminology (although it does help if we all use the words in the same way).
You can use normal DOM programming to get each of the Person elements, which is what your example shows. If you want to serialize each of those elements back to an XML document, then here's what you do:
Joined: Nov 03, 2003
Much appreciated for your code snippet. Tried it and think that's what I exactly needed to get what I wanted. Again thanks a lot!
subject: Recursively parse XML and splitting into separate XMLs