Create Web Data Entry (from XML)

Create Web Data Entry (from XML)

avatar

Here’s a simple example of the RDM PowerShell snap-in at work. We’ll be covering how I imported all blog URLs from Google Reader.

1. I started by exporting my Google Reader subscriptions (via Google Takeaway).
2. Next, I loaded the file into an XmlDocument using Get-Content.
3. Finally, I created an RDM session for each node, and assigned the appropriate properties:

[xml]$rss = Get-Content C:\rss.xml;
foreach ($site in $rss.opml.body.outline)
{
$session = New-RDM-Session -Name $site.Text -Kind "DataEntry"
$session.Group = "RSS"
$session.[b]AddDataEntryKind[/b](11 <# Web #> );
Set-RDM-Session $session [b]-NoRefresh[/b];
[b]Set-RDM-Property[/b] -ID $session.ID -Path "DataEntry" -Property "Url" -Value $site.htmlUrl
}

edited by stefane on 2/21/2013
edited by stefane on 4/11/2013

Stéfane Lavergne

All Comments (0)