天天看點

【Silverlight】Silvelright擷取web端的xml

Silverlight富用戶端要擷取web端的xml資料

可以通過WCF,WebService中間管道,

也可以使用WebClient直接根據Url擷取!

比如:Test.xml是放在ClientBin下面的檔案夾中的!

在Silverlight用戶端:

WebClient wc=new WebClient();

wc.DownloadStringCompleted+=(sender,e)=>{

var result=e.Result;

};

wc.DownloadStringAsync(Url//路勁);

至于怎麼擷取Url,可以看我的上一篇文章!