473,385 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to convert XML subscription file to OPML

XML gurus,

I need help in converting my feedreader subscription XML file to an
OPML file. I have no idea how to do that.

Thanks in advance.
Jul 20 '05 #1
1 8245
Desi wrote:
XML gurus,

I need help in converting my feedreader subscription XML file to an
OPML file. I have no idea how to do that.


Something like this (feedreader2opml.xsl) should do:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" />
<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>

<xsl:template match="feeds">
<opml version="1.0">
<head>
<title>Converted from feedreader subscriptions using
feedreader2opml.xsl</title>
</head>
<body>
<xsl:apply-templates />
</body>
</opml>
</xsl:template>

<xsl:template match="item">
<outline type="rss">
<xsl:choose>
<xsl:when test="title/text() != ''">
<xsl:attribute name="text"><xsl:value-of
select="normalize-space(title/text())" /></xsl:attribute>
<xsl:attribute name="title"><xsl:value-of
select="normalize-space(title/text())" /></xsl:attribute>
</xsl:when>
<xsl:otherwise />
</xsl:choose>
<xsl:choose>
<xsl:when test="htmlurl/text() != ''">
<xsl:attribute name="htmlurl"><xsl:value-of
select="normalize-space(htmlurl/text())" /></xsl:attribute>
</xsl:when>
<xsl:otherwise />
</xsl:choose>
<xsl:choose>
<xsl:when test="link/text() != ''">
<xsl:attribute name="xmlurl"><xsl:value-of
select="normalize-space(link/text())" /></xsl:attribute>
</xsl:when>
<xsl:otherwise />
</xsl:choose>
</outline>
</xsl:template>

<xsl:template match="*" />
</xsl:stylesheet>
--
Klaus Johannes Rusch
Kl********@atmedia.net
http://www.atmedia.net/KlausRusch/
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: the_ainbinders | last post by:
Anything like this around anywhere? Need to be able to input RSS information for several feeds and have it create an OMPL file. TIA, Rob
1
by: Ernesto | last post by:
Using the "Pull New Subscription" wizrd in the enterprise manager, I can create a subscription without a problem. Howwever using TSQL I cannot do the same thing: Using this sequence:...
0
by: Tom Denford | last post by:
I have an XML file (exported using RSSReader) and need to import (?) it into FeedReader. FeedReader only supports OPML format as far as I can see. Does anyone know how I can import or convert...
11
by: DraguVaso | last post by:
Hi, I want to download Visual Studio 2005 Beta 1 Refresh, but on the site of Microsoft they say it is only for MSDN subscribers? what is a MSDN subscriber and how do I get it? When I try to...
3
by: Max A. Bündchen | last post by:
My enterprise is a Registered Microsoft Partner and we would to acquire a MSDN Universal subscription under the Empower ISV Program to start a new project in .Net (today we dev under VFP 7). ...
5
by: Odd Bjørn Andersen | last post by:
I have a problem when using Replication Center on version 8.2 (fixpack 9) when I try to manage my SQL Replication environment. When I add existing Apply Control Servers I am not able to see...
6
by: WebMatrix | last post by:
Hello, Sorry for the repost, I haven’t got any response in aspnet.webservices group. We have a web service being used by several clients. It's SSL secured, uses Windows (Basic)...
6
by: vighnesh | last post by:
Hi Folks I am dealing with a project in which I have to convert the image files as PDF files. Can anyone please suggest how can we achieve that. I tried on google for it, but I found some...
2
by: =?Utf-8?B?SmFzb24gQS4gSmVuc2Vu?= | last post by:
I have a MSDN Subscription expiring this month but really need Visual Studio 2008 when it comes out. I called customer service to find out but they don't know. They seemed to think it was a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.