XML elements are now populated with values.

The recently added trim code, broke the forms in that they didn't
retain there values when submited. This makes those changes only
apply to string so the elements get processed correctly.

Also coding standards.