Discover how a bimodal integration strategy can address the major data management challenges facing your organization today.
Get the Report →Automate RSS Integration Tasks from PowerShell
Are you in search of a quick and easy way to access RSS feeds from PowerShell? This article demonstrates how to utilize the RSS Cmdlets for tasks like connecting to RSS feeds, automating operations, downloading data, and more.
The CData ADO.NET Provider for RSS is a standard ADO.NET Provider that make it easy to accomplish data cleansing, normalization, backup, and other integration tasks by enabling real-time access to RSS.
ADO.NET Provider
The ADO.NET Provider provides a SQL interface for RSS; this tutorial shows how to use the Provider to retrieve RSS feeds.
Once you have acquired the necessary connection properties, accessing RSS feeds in PowerShell can be enabled in three steps.
You can connect to RSS and Atom feeds, as well as feeds with custom extensions. To connect to a feed, set the URL property. You can also access secure feeds. A variety of authentication mechanisms are supported. See the help documentation for details.
-
Load the provider's assembly:
[Reflection.Assembly]::LoadFile("C:\Program Files\CData\CData ADO.NET Provider for RSS\lib\System.Data.CData.RSS.dll")
-
Connect to RSS:
$conn= New-Object System.Data.CData.RSS.RSSConnection("URI=http://broadcastCorp/rss/;") $conn.Open()
-
Instantiate the RSSDataAdapter, execute an SQL query, and output the results:
$sql="SELECT Author, Pubdate from Latest News" $da= New-Object System.Data.CData.RSS.RSSDataAdapter($sql, $conn) $dt= New-Object System.Data.DataTable $da.Fill($dt) $dt.Rows | foreach { Write-Host $_.author $_.pubdate }