Jump to content
Sign in to follow this  
Laura Griffin Long

RSS Feed of URLs

Recommended Posts

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.... 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

worked perfectly!! Thanks!!!

So, I guess what I am wondering... do I have to go through so many steps to bring in the RSS and create a field for the XML or is there a way to directly import from the RSS feed?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By eyepro
      I'm very very very newbie on xml.
      What I need to understand is if it's possibile export in this way.
      I use a xsl stylesheet to export from FM.
       
      I was able to use the <xsl:for-each to export details in the way I want:
      <xsl:for-each select="fmp:FMPXMLRESULT/fmp:RESULTSET/fmp:ROW">
              <Details>
                  <Code><xsl:value-of select="fmp:COL[2]/fmp:DATA"/></Code>
                  <WTN><xsl:value-of select="fmp:COL[3]/fmp:DATA"/></WTN>
                  <Date><xsl:value-of select="fmp:COL[4]/fmp:DATA"/></Date>
                  
      result:
      <Details>
      <Code>0280c1</Code>
      <WTN>1</WTN>
      <Date>10/04/2018</Date>
      </Details>
      <Details>
      <Code>0280c2</Code>
      <WTN>2</WTN>
      <Date>10/04/2018</Date>
      </Details>
      <Details>
      <Code>0280c3</Code>
      <WTN>3</WTN>
      <Date>10/04/2018</Date>
      </Details>
      what i need to know is how put the fmp:COL[1] above the <xsl:for-each to get this:
      <CUSTOMER>ABC</CUSTOMER>
      <INVOICE>01</INVOICE>
      <Details>
      <PrimaryKey>0280c1</PrimaryKey>
      <WTN>1</WTN>
      <Date>10/04/2018</Date>
      <Colours/>
      </Details>
      <Details>
      <PrimaryKey>0280c2</PrimaryKey>
      <WTN>2</WTN>
      <Date>10/04/2018</Date>
      <Colours/>
      </Details>
      <Details>
      <PrimaryKey>0280c3</PrimaryKey>
      <WTN>3</WTN>
      <Date>10/04/2018</Date>
      <Colours/>
      </Details>
       
      Thanks in advance.
    • By DarioDN
      Dear all, I've just create a script to export my records in multiple xml file (one xml for each record) applying also an XSL stylesheet.
      So, if I use the style.xsl taking from my computer ("source" button when filemaker ask me to select the file) it works. If I put the same file online, it doesn't work giving me a SAXParseException error: internal error in NetAccess (occurred in an unknown entity, at line 0, column 0).
      In the same folder where I have the style.xsl there are other xsl files that works, but they are used to "import" process (from XML to FILEMAKER, while in this case I'm working to an export process, from FILEMAKER to XML, I don't know if this could be the problem)
      Someone could help me to understand the error? Thank you
      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fmp="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fmp" > <xsl:output omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="fmp:FMPXMLRESULT"> <xsl:for-each select="fmp:RESULTSET/fmp:ROW"> <xsl:text>&#xA;</xsl:text> <xsl:text disable-output-escaping="yes">&lt;!--</xsl:text> <xsl:value-of select="fmp:COL[1]/fmp:DATA"/>.<xsl:value-of select="fmp:COL[2]/fmp:DATA"/>.<xsl:value-of select="fmp:COL[3]/fmp:DATA"/><xsl:text disable-output-escaping="yes">--&gt;</xsl:text> <problem display_name="Checkboxes" > <choiceresponse> <label><xsl:value-of select="fmp:COL[4]/fmp:DATA"/></label> <checkboxgroup> <choice correct="{fmp:COL[6]/fmp:DATA}"> <xsl:value-of select="fmp:COL[5]/fmp:DATA"/> <choicehint selected="true"><xsl:value-of select="fmp:COL[7]/fmp:DATA"/> </choicehint> </choice> <choice correct="{fmp:COL[9]/fmp:DATA}"> <xsl:value-of select="fmp:COL[8]/fmp:DATA"/> <choicehint selected="true"><xsl:value-of select="fmp:COL[10]/fmp:DATA"/></choicehint> </choice> <choice correct="{fmp:COL[12]/fmp:DATA}"> <xsl:value-of select="fmp:COL[11]/fmp:DATA"/> <choicehint selected="true"><xsl:value-of select="fmp:COL[13]/fmp:DATA"/></choicehint> </choice> </checkboxgroup> </choiceresponse> </problem> <xsl:text>&#xA;</xsl:text> </xsl:for-each> </xsl:template> </xsl:stylesheet>  
    • By Pavlk
      I've attached two files. The first one is INVOICE, that is generated by every establishment when you purchase, and is in xml format.
      The second one is XSLT file, that is provided by government fiscal institution and is used to "translate" xml.
      PROBLEM DESCRIPTION: when I try to decode xml using attached xslt scheme on any online xml-converter website the output looks fine. BUT when importing to Filemaker, I receive an error: "XML parsing error: invalid document structure".
       
      I would appreciate any help with the issue. Thanks.
      XML input.xml
      XSLT scheme.xslt
×
×
  • Create New...

Important Information

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