Horizon, I know it well! (Well did, and bits of it)
A good few years ago I was asked to do some Integration work, to get Horizon (in the PO estate)- to talk to some internal RMG (Royal Mail Group) systems. For example, things like Royal Mail and Parcelforce tracking information captured in a post Office on behalf of RMG. There were (and still are) a lot of interfaces between PO and RMG!
The original Horizon system was built to deliver one function (something to do with benefits payments if I remember correctly), and for whatever reasons, it used a fixed width flat-file format for all data transfers. As anyone knows, extending these types of files to add new data can be a pain. (I suspect whoever in the PO specified the original platform, was an ex Mainframe person!).
By the time I got involved, Horizons usage was being expanded on greatly, and for many different types of services (bill payments, parcel tracking, parcel collections etc.), and they realised they couldn't fit all this data in to the fixed-width flatfile format they were using (it had one interface, with one flatfile structure, for everything going into RMG!).
So someone decided to use XML, this was over 10 years ago, so all-in-all, not a bad decision really, except....
Rather than changing the current interface or building a new XML interface to run alongside the old one, they decided to just tag the XML onto the end of each line in the flatfile! So you ended up with something like 180 chars of fixed-width data, and then up-to something like 2000 characters of XML data, this without any whitespace (so no linefeeds, or tabs etc.). You then had a linefeed at the end of the XML, and then another 180 chars of flat data, then more XML and so on, with typically several hundred lines of text in each file/message.
To make matters worse, the Horizon team created schemas for the XML (there were several flavours of XML depending on the Horizon service), and we coded to the schemas. Good so far.
But when the Horizon team implemented it in code at their end, for reasons they never explained, they couldn't guarantee the order in which the elements were produced withing the resulting XML portion (despite the schema that they created, being in a rigid fixed structure!).
It's no wonder their IT is so expensive to look after, and so difficult to migrate, when they allow incompetent people to specify solutions like this, and seemingly no one to then push back on the specs, to say "Seriously? You want to do what!".
Hmm, sorry for the rant! It's Monday! ....and breath....