That XML file is set as an Embedded Resource as I don't want anyone to easily copy my parsed information.
How can I save this information to this XML file?
To READ from an Embedded Resource, I've done this and it works:
XDocument championXml;
var asm = Assembly.GetExecutingAssembly();
using (var stream = asm.GetManifestResourceStream("LinqToXmlDemo.Champions.xml"))
{
using (XmlReader reader = XmlReader.Create(stream))
{
championXml = Xdocument.Load(reader);
}
}
But I'm stuck on how to write information on a stream.
How can I save my List<string> strings into an XML in my project?
Ideally, I'd like the XML to look like:
<urls>
<url>URL here...</url>
<url>URL here...</url>
<url>URL here...</url>
<url>URL here...</url>
<url>URL here...</url>
</urls>
This post has been edited by Sergio Tapia: 07 December 2011 - 02:31 PM

New Topic/Question
Reply



MultiQuote




|