C# : XmlDocument dans un string

string str = "";

StringReader reader = new StringReader(@"C:\test.xml");

XmlDocument doc = new XmlDocument();
doc.Load(reader);

StringWriter writer = new StringWriter();
doc.Save(writer);

str = writer.ToString();

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.