Jump to content

RSS Feed of URLs


Laura Griffin Long

This topic is 1890 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I have an rss feed that returns data like this: 

2009 LLCs, Corporations, & Business Legal Updates
2009 Personal Finance Legal Updates
2010 LLCs, Corporations, & Business Legal Updates
2010 Personal Finance Legal Updates
2011 Personal Finance Legal Updates
2012 Wills, Trusts, and Estates Legal Updates 

If I click on one of the links I can see the XML.  I need to import all of the XML into my database.  I have done XML/XSL imports before, but it is throwing me off because of the RSS List.  How do I go about this?  Right now I do a copy/paste on view source, put all of that into Notepad++ and then scrub the data.  I use that for an import into a Filemaker table to get the URL.  Then I do an insert by URL to get the XML into the table.  This seems like a lot, I am hoping there is an easier way.... 

Link to comment
Share on other sites

Try the following XSLT stylesheet:

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:atom="http://www.w3.org/2005/Atom"
exclude-result-prefixes="atom">
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>

<xsl:template match="/atom:feed">
	<FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
		<!-- FIELDS -->
		<METADATA>
			<FIELD NAME="title"/>
			<FIELD NAME="link"/>
			<FIELD NAME="id"/>
			<FIELD NAME="published"/>
			<FIELD NAME="updated"/>
			<FIELD NAME="summary"/>
			<FIELD NAME="author_name"/>
			<FIELD NAME="author_uri"/>
			<FIELD NAME="category"/>
			<FIELD NAME="content"/>
		</METADATA>
		<!-- DATA -->
		<RESULTSET>
			<xsl:for-each select="atom:entry">
				<ROW>
					<COL><DATA><xsl:value-of select="atom:title"/></DATA></COL>
					<COL><DATA><xsl:value-of select="atom:link/@href"/></DATA></COL>
					<COL><DATA><xsl:value-of select="atom:id"/></DATA></COL>
					<COL><DATA><xsl:value-of select="atom:published"/></DATA></COL>
					<COL><DATA><xsl:value-of select="atom:updated"/></DATA></COL>
					<COL><DATA><xsl:value-of select="atom:summary"/></DATA></COL>
					<COL><DATA><xsl:value-of select="atom:author/atom:name"/></DATA></COL>
					<COL><DATA><xsl:value-of select="atom:author/atom:uri"/></DATA></COL>
					<COL><DATA><xsl:value-of select="atom:category/@term"/></DATA></COL>
					<COL><DATA><xsl:value-of select="atom:content"/></DATA></COL>
				</ROW>
			</xsl:for-each>
		</RESULTSET>
	</FMPXMLRESULT>
</xsl:template>

</xsl:stylesheet>

 

  • Like 1
Link to comment
Share on other sites

This topic is 1890 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.