Hello Marcus,
Try if this helps. It assumes all elements are missing ending tag, and
doesn't support embedded tags. If that's the case, a more sophisticated
script might be needed.
perl -0777 -wpl -e 's{(<(\w+).*?>.*?)(?=\s*(<\w|\z))}{$1. " </$2>"}esg'
Hope this helps.
Thanks,
--Emen