I'd use XML::Simple to grab the file to a data structure, then print it out as a form, then save it back again when you submit. You'll have issues with the naming convention for the fields, but you seem to have various ideas about that yourself.
($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss')
=~y~b-v~a-z~s; print