tags:

views:

41

answers:

2

Hi I use Silverlight 3 and .net 3.5

I have a config file in xml which is the the following format

<applicationlist>
<application>
    <el1>test1</el1>
    <el2>http://localhost/1&lt;/el2&gt;
    <el3>http://localhost/2&lt;/el3&gt;
    <el4>http://localhost/3&lt;/el4&gt;
</application>
</applicationlist>

I want to store this config file in the host web application and read from the silverlight application. But since silverlight has many access restrictions, i could not achieve this. Any idea how i can proceed?

A: 

If the xml file is in the same domain as your silverlight application you can load the xml using the XmlReader.Create method.

Note that if the xml file is not on the same domain, make sure you add a clientaccesspolicy.xml file to you domain.

Sorskoot
@Sorskoot: thanks.. the one you have mentioned is also an approach.
Amit
+1  A: 

Hi All,

I ultimately used the approach mentioned here

http://www.kirupa.com/blend_silverlight/loading_xml_sl2_pg1.htm

Amit