I think I've gone as far as I can without an XML parser.

Works on 8.011, but 8.02 has multi-line tags that cause issues. Looking
for an XML parser.