Writing XML using XmlSerializer

Posted by krrishbiju-15589 under C# on 5/28/2012 | Points: 10 | Views : 5679 | Status : [Member] | Replies : 6
Hi,
I have created Windows application for writing XML file.
The code has given below

XmlSerializer serializer = new XmlSerializer(typeof(List<string>));
TextWriter textWriter = new StreamWriter("E:\\VSProjects\\XMLStudy\\XMLStudy\\XMLFileyu.xml");
serializer.Serialize(textWriter, movie);
textWriter.Close();

and error occurring as "There was an error generating the XML document."

Please help me to solve this.............




Responses

Posted by: Sakthi.Singaravel on: 5/28/2012 [Member] Silver | Points: 25

Up
0
Down
post (attach) full code..

Regards,
Singaravel M

krrishbiju-15589, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vijayamadhavareddy on: 5/29/2012 [Member] Starter | Points: 25

Up
0
Down
post full code which includes movie list declaration and creation

Vijay

krrishbiju-15589, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 5/31/2012 [Member] Bronze | Points: 25

Up
0
Down
http://www.jonasjohn.de/snippets/csharp/xmlserializer-example.htm

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

krrishbiju-15589, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 5/31/2012 [Member] Bronze | Points: 25

Up
0
Down
http://www.codeproject.com/Articles/14064/Using-the-XmlSerializer-Attributes

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

krrishbiju-15589, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 5/31/2012 [Member] Bronze | Points: 25

Up
0
Down
http://www.google.co.in/search?sugexp=chrome,mod=9&sourceid=chrome&ie=UTF-8&q=Writing+XML+using+XmlSerializer+in+C%23

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

krrishbiju-15589, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ajay.Kalol on: 6/2/2012 [Member] Starter | Points: 25

Up
0
Down
http://ajaypatelfromsanthal.blogspot.in/2012/06/create-xml-using-c.html

for create XML file using C#.Net

Ajay
ajaypatelfromsanthal.blogspot.in

krrishbiju-15589, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response