TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dejan Djokovic
NA
1
0
Need help with getting XML feed
Sep 11 2007 9:59 AM
When I try to get data from some XML feed using this code:
WebRequest reguest = HttpWebRequest.Create(uri);
StreamReader stream = new StreamReader(reguest.GetResponse().GetResponseStream());
FileStream fs = new FileStream(filePath, FileMode.OpenOrCreate);
StreamWriter sw = new StreamWriter(fs);
sw.Write(stream.ReadToEnd());
stream.Close();
sw.Close();
fs.Close();
As
result I get file that contains something like this:
Hy{m jI"t?7I~wiwW}u5[-O$[ox>c:}i7}qwM[ugiT?&9_?[N^Zzo?5tFh(`x*<`S~e:!pP{G?y? <??~ge|.29Nw.uy ?2f?) "&`_9%44[wLu[v/mw~z}"30<{EdK/f?XzB~0OO_GzE/z}S{?:[px%
$`$`U]*M?u?DLt~"k8y:Zwq? 'Y8>wG?:'o
With another XML feed the resulting file is OK.
Can anybody help me?
Reply
Answers (
0
)
NP41 Why Casting
Output text to windows Form