Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# XML
hi
Please help me
if you have an xml contents(or file ie yahoo weather service result)
,how to load it as a web page not xml contents in web browser in c# windows application
thanks.
Posted 15-Nov-12 23:56pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Have you examined closely the XML result of a Yahoo Weather RSS feed in response to a query ?
 
For example: [^]
 
You will see that the XML includes a link to an HTML representation in the Yahoo format. Look at the <link> node under the Item sub-node under the root-node "Channel:"
<item>
  <title>Conditions for Sunnyvale, CA at 9:38 am PST</title>
  <geo:lat>37.37</geo:lat>
  <geo:long>-122.04</geo:long>
  <link>http://us.rd.yahoo.com/dailynews/rss/weather/Sunnyvale__CA/*http://weather.yahoo.com/forecast/USCA1116_f.html</link>
So parse the XML (either via the DOM, or just plain old file-searching, or string searching), extract the HTML link, do a "get" on that link, and then re-use the HTML returned.
 
Now, if your purpose is to extract the data in a Yahoo Weather RSS XML response, and present it in your own HTML format: that's another problem. For that, you can either construct your own XSLT transform, or parse the file yourself, extracting what you need, and generating custom HTML.
 
In either case you should follow the Yahoo guidelines for attribution, found in the first link given in this answer under "Terms of Service."
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Web pages are using HTML. You can use XSLT to transform XML in HTML then load the HTML.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 550
1 mhegazy94 460
2 Ravi Bhavnani 230
3 Kornfeld Eliyahu Peter 185
4 Shemeemsha RA 160
0 Sergey Alexandrovich Kryukov 7,295
1 OriginalGriff 6,841
2 CPallini 5,420
3 George Jonsson 3,654
4 Gihan Liyanage 2,797


Advertise | Privacy | Mobile
Web03 | 2.8.140922.1 | Last Updated 16 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100