-1
실버 라이트에서 브라우저 외부 응용 프로그램을 사용하고 있습니다.웹 클라이언트 방법을 사용하여 OOB 응용 프로그램에서 xml 파일을 가져 오는 방법
아래 코드에서 xml 파일을로드하는 동안 문제가 있습니다. 내 xml 파일이
<Root>
<element>FirstElement</element>
</Root>
을 포함
string contentUri = Application.Current.Host.Source
.AbsoluteUri;
var contentUri1 = contentUri.Substring(0, contentUri.LastIndexOf("/")) + "/Hello1.xml";
WebClient wc = new WebClient();
wc.OpenReadCompleted+=(open,read)=>
{
string content;
using (StreamReader reader = new StreamReader(read.Result,Encoding.Unicode))
{
byte[] m_Bytes = ReadToEnd(read.Result);
string s = Encoding.UTF8.GetString(m_Bytes, 0, m_Bytes.Length);
}
};
wc.DownloadProgressChanged
+= (chang,dh)=>
{
};
wc.OpenReadAsync(new Uri(contentUri));
내가 가지고 내가 원래의 XML 콘텐츠를 다운로드 할 수있는 방법 출력이 사람이 나를 도와주세요 수있는 쓰레기 값?