Fix loss of in moving buildForm to Xml.php, generalise it (this isn't just for globa...