Recent discussion: Why I use Object Pascal | https://news.ycombinator.com/item?id=15490345 (2017Oct:268points,233comments)
Delphi forms are in one of two formats.
1) Binary serialization of the form data (this is the older versions, pre 4/5)
2) A textual representation.
The code for a Delphi form was pre-XML, but it looked like a set of standard markup. There were resources (Form, Button, Edit, Label - these types of control) and they were laid out in a hierarchical developer readable form in blocks. The form code was streamed to/from the file (the files were embedded as resources in the Eve, and the form was read and re-constituted at runtime as well as design time.) Borland made a massive deal about the "two way editing" one could do to the forms. The developer was able to cut and paste controls, and the controls were cut/copied as straight text, which could be pasted to notepad (for example) IIRC.
We should just go back to Delphi, it was/is one of the best ways of doing GUIs.