You could match your tag pairs using a regular expression like this:
Code:
perl -pe 's%(<[^>]*>[^<]*</[^>]*>)%$1\n%g' <input.txt >output.txt
but it will start getting overly complicated if you have to deal with nested tags and so on.
A better alternative would be to use an existing xml formatting tool such as
xmlindent.