Click here to Skip to main content
16,023,339 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai,

I Need to Open XML File in Silverlight.My Code is
C#
XDocument XDoc = XDocument.Load(@"D:\Manjula\WebCam1.0\WebCam1.0.Web\ClientBin\StoreUserInfo.xml");

               // Query for retriving all Images data from XML
               var Query = from Q in XDoc.Descendants("Image")
                           select new ImageEntity
                           {
                               ImageName = Q.Element("ImageName").Value,
                               ImagePath = Q.Element("ImagePath").Value
                           };

               // return images data
               return Query.ToList<ImageEntity>();


But i got this Error:
Cannot open 'file:///D:/Manjula/WebCam1.0/WebCam1.0.Web/ClientBin/StoreUserInfo.xml'. The Uri parameter must be a relative path pointing to content inside the Silverlight application's XAP package. If you need to load content from an arbitrary Uri, please see the documentation on Loading XML content using WebClient/HttpWebRequest.

Can anyone pls tell me a solution to this problem.Thanks in Advance
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900