I want to create a registration form in Silverlight, while I am filling that form it must be save in xml format. I have created a design page
username: om
password: prakash
Login-> while clicking login in button a registration from will be load and I want to enter details of
name:om
age:25
address:india
location:Chennai
save
while I am clicking save--->>the above details must be save in xml format how can I dooo this
please reply
Ck NitinPosted Aug 2, 2013, 5:36 AM
Hello OM
You can follow this approach to build your XML.
XDocument doc = new XDocument(
new XDeclaration("1.0", "utf-16", "true"),
new XComment("This is comment by you"),
new XElement("Employees",
new XElement("Employee",
new XAttribute("id", "EMP001"),
new XElement("name", "Ck. Nitin"),
new XCData("~~~~~~~XML CDATA~~~~~~~~"))));
doc.Save("d:\\test.xml");
Pass the value of your controls.
EMP001 <- TextBox Value
Thanks