The filename of the file that gets the text is always named after the text in the <>?
Will there be only one occurrence of each tag in a file or can a tag appear multiple times in different places in the file?
Do you want the <tag></tag> to also appear in the output file or just the text between the tag start and end?
Where do the output files live? In the same folder as the input file or another folder? Will the output files exist already and be appended to or are they created new for each input file each time?
1. Filename is imaterial and has nothing to do with the contents.
2. There can me multiple occurences, but this will always follow the following sructure. <tag><\tag><tag><\tag>...
the following case is not present <tag>affa<tag>afa<\tag><\tag>.
3. I want the <tag> <\tag> to appear in the output.
4. The output files can be in the same folder but these files need to be created for each input.(wont be present)