i am creating xml file using below code
Root = XD.AppendChild(XD.CreateElement("Root"));
XmlNode name= Root.AppendChild(XD.CreateElement(" name "));
XmlNode UserName = Root.AppendChild(XD.CreateElement("UserName"));
Root.AppendChild(Cloud);
Root.AppendChild(CloudUserName);
//XmlAttribute ChildAtt = Child.Attributes.Append(XD.CreateAttribute("Attribute"));
Cloud.InnerText = test.ServiceName;
CloudUserName.InnerText = test.UserName;
CloudKey.InnerText = test.Password;
XD.Save(appStartPath);
now how to do deserialization of this data?
now how to do deserialization of this data?
VulpesPosted May 3, 2012, 7:15 AM
Here's a possible class (I've called it User but you can call it whatever you like). Notice that this needs to be declared public:
The code to deserialize the file into an object of this class would then be something like this:
// ....