You can do it in your C# code like-
XElement xml = new XElement("Emp");
xml.Add(
new XElement("Field",
new XAttribute("Name", "Field1"),
textbox1.Text),
new XAttribute("Name", "Field2"),
textbox2.Text),
new XAttribute("Name", "Field3"),
textbox3.Text),
);
Now pass the value of "xml" for the [XMLFile] field.
Hope, it helps :)