Applying XSL to an RSS feed

In this recipe, we will create a styled HTML file based on an existing RSS feed and XSL (stylesheet).

Getting ready

The files needed for this recipe are included in the downloadable book scripts from the Packt website. Once you've downloaded the files, copy the XML Files\RSS folder to your local C:\ directory. This folder will have two files: one sample RSS feed (sample_rss.xml) and one XSL file (rss_style.xsl).

How to do it...

These are the steps required for styling an RSS feed:

  1. Open PowerShell ISE as an administrator.
  2. Add the following script and run it:
    #replace these with the paths of the files in your system Set-Alias ie "$env:programfiles\Internet" #remove $rss variable if it already exists if ($rss) { Remove-Variable ...

Get SQL Server 2014 with PowerShell v5 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.