Fix XML generation a bit; add field tag with name attribute and field value inside tag