Silverlight 4 - Save xml file in Client Side with Elevated Trust / Out Of Browser
I am trying to save an xml file in Client side with Elevated Trust / Out Of Browser mode.. But it's not working....
Please find the following code
XDocument doc = XDocument.Load(new Uri("MyFile.xml",UriKind.RelativeOrAbsolute).ToString());
doc.Element("Books").Element("Book").AddAfterSelf(
new XElement("Cateogry",
new XAttribute("name", "Programming")));
XmlWriter writer = doc.CreateWriter();
doc.Save(writer);
Am开发者_StackOverflow I doing some thing wrong here
Thanks Deepu
If your application has elevated trust see this example: http://forums.silverlight.net/forums/p/203442/475894.aspx
This will not work on a mac though. If you want to save a file that will work on both windows and mac use the isolated storage.
I hope this helps.
精彩评论