This was put together in response to a request to handle a .txt file containing multiple XML documents (complete with XML Processing instructions). It runs through a text file (of any size really) and seeks out the start of each PI (Looking for the combination of '<' and '?' together). Each time it finds a PI it writes the content to an XML file. Not sure how useful this will be to anybody but I'm placing it here for reference anyway. It's been designed to handle text documents that look like this:
Or this:
Here's the class:
3 comments:
But if you have multiple
and then splitting
Thank you, worked like a charm!
Beauuuuutiful! Thank you!
Post a Comment