开发者

Silverlight 4 - Save xml file in Client Side with Elevated Trust / Out Of Browser

开发者 https://www.devze.com 2023-02-18 00:05 出处:网络
I am trying to save an xml file in Client side with Elevated Trust / Out Of Browser mode.. But it\'s not working....

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号