tdignan87
Well-known member
- Joined
- Jul 8, 2019
- Messages
- 95
- Programming Experience
- Beginner
Hi
Hoping someone can give me a wee hand.
I have a XML file, that i am adding some new elements then saving as another XML but debugging shows the application cant find the file.
The file is there in the correct path,
Any ideas?
Cheers
Tom
Hoping someone can give me a wee hand.
I have a XML file, that i am adding some new elements then saving as another XML but debugging shows the application cant find the file.
The file is there in the correct path,
Any ideas?
C#:
try
{
XDocument xmlDocument = XDocument.Load(@"C:\Stevens\Integration Service\ConvertPO\PO.xml");
XDocument result = new XDocument(
new XElement("Stevens",
new XElement("purchaseOrders",
from s in xmlDocument.Descendants("Orders")
select new XElement("createdDate", new XElement("purchaseOrders", s.Element("createdTime").Value)))));
result.Save(@"C:\Stevens\Integration Service\ConvertPO\\POAMENDED.xml");
Console.ReadLine();
}
catch (System.IO.FileNotFoundException e)
{
Console.WriteLine(e.ToString());
Console.ReadLine();
}
Cheers
Tom