Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/317.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何在silverlight中从xml读取配置?_C#_Silverlight - Fatal编程技术网

C# 如何在silverlight中从xml读取配置?

C# 如何在silverlight中从xml读取配置?,c#,silverlight,C#,Silverlight,嗨,我使用Silverlight 3和.net 3.5 我有一个xml格式的配置文件,格式如下 <applicationlist> <application> <el1>test1</el1> <el2>http://localhost/1</el2> <el3>http://localhost/2</el3> <el4>http://localhost/3

嗨,我使用Silverlight 3和.net 3.5

我有一个xml格式的配置文件,格式如下

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

测试1
http://localhost/1
http://localhost/2
http://localhost/3

我想将此配置文件存储在主机web应用程序中,并从silverlight应用程序读取。但由于silverlight有很多访问限制,我无法实现这一点。知道如何继续吗?

如果xml文件与silverlight应用程序位于同一域中,则可以使用该方法加载xml


请注意,如果xml文件不在同一个域中,请确保向域中添加一个xml文件。

我最终使用了这里提到的方法