For testing purposes I'd like to load an XML file to an XDocument object.
How can I accomplish this? Thanks!
For testing purposes I'd like to load an XML file to an XDocument object.
How can I accomplish this? Thanks!
This is a start:
XDocument doc = XDocument.Load("PurchaseOrder.xml");
Console.WriteLine(doc);
var xdoc = new XmlDocument();
var filePath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + @"\kb.xml";
xdoc.Load(filePath);
var path = System.IO.Path.Combine( Environment.GetFolderPath( Environment.SpecialFolder.Desktop ), "Filename.xml" );
var xdoc = XDocument.Load( path );