I know that there is a way to save data in an xml file with classes and their properties using XML Serialization.But Is there any way to save data without using classes and XML Serialization???
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Absolutely – I would recommend LINQ to XML. For example:
Obviously any of these literals can be supplied from your object data – and LINQ to XML makes it easy to create XML from sequences, LINQ queries etc.
Resulting test.xml file:
LINQ to XML is a lovely API – much nicer than the old
XmlDocumentone, IMO.