I am writing a string to a xml document.
I now have several different strings and I want to write all of them to one xml file. Is there any way of doing this instead of having numerous single xml files?
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.
Instead of writing strings out, use
XDocumentto construct the XML structure andSaveto a file.This will keep you from making mistakes in the format of the XML file itself, as XML is not simple text, but a structured file format.