Camel case ALL text not found with angle brackets.
This seems to be what you are saying.
Or is is a matter of when we see a PARTICULAR tag, camel case the following string.
Or something else.
If you don't have Perl on the system, can you get the files on a system that does?