File tree 3 files changed +31
-0
lines changed 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ Greetings from Cairo, Egypt. You can [sponsor](https://github.com/sponsors/dodyg
48
48
| [ Request] ( /projects/request ) | 15 | Form, Cookies, Query String, Headers |
49
49
| [ Request Timeouts Middleware] ( /projets/request-timeouts-middleware ) | 6 | |
50
50
| [ Response] ( /projects/response ) | 3 | |
51
+ | [ RSS] ( /projects/rss-reader ) | 1 | |
51
52
| [ SignalR] ( /projects/signalr ) | 1 | |
52
53
| [ Security] ( /projects/security ) | 7 | |
53
54
| [ Single File Application] ( /projects/sfa ) | 2 | |
Original file line number Diff line number Diff line change
1
+ using System . Net ;
2
+ using System . Xml ;
3
+
4
+ const string rssUrl = "https://www.newyorker.com/feed/everything" ;
5
+ var xmlDoc = new XmlDocument ( ) ;
6
+
7
+ try
8
+ {
9
+ using ( var webClient = new WebClient ( ) )
10
+ {
11
+ var rssData = webClient . DownloadString ( rssUrl ) ;
12
+ xmlDoc . LoadXml ( rssData ) ;
13
+ }
14
+
15
+ Console . WriteLine ( xmlDoc . InnerXml ) ;
16
+ }
17
+ catch ( Exception ex )
18
+ {
19
+ Console . WriteLine ( "Error loading RSS feed: " + ex . Message ) ;
20
+ }
Original file line number Diff line number Diff line change
1
+ <Project Sdk =" Microsoft.NET.Sdk" >
2
+
3
+ <PropertyGroup >
4
+ <OutputType >Exe</OutputType >
5
+ <TargetFramework >net8.0</TargetFramework >
6
+ <ImplicitUsings >enable</ImplicitUsings >
7
+ <Nullable >enable</Nullable >
8
+ </PropertyGroup >
9
+
10
+ </Project >
You can’t perform that action at this time.
0 commit comments