2 Replies Latest reply on Dec 15, 2016 4:40 AM by beverly

    nested xml export


      I am returning to FMP after a 20 year absence, and I'm trying to figure out if Filemaker can do what we need to do.


      We are a film company, and produce streaming film channels.  We need to produce MRSS (media RSS feeds) that match the format below.  The regular .xml is pretty straightforward, but I'm not sure how to replicate the nested data - is this something we can create from FMP.  If anyone can point me in the appropriate direction, I'd be grateful.




      <irc:gridrowtitle>Two Item List</irc:gridrowtitle>






      <irc:shortdescriptionline1>ITVC Demo Item 1</irc:shortdescriptionline1>


      <irc:shortdescriptionline2>Created using the ITVC MRSS Generator</irc:shortdescriptionline2>

      <irc:title>Instant TV Channel Demo One</irc:title>




      <irc:artist>Salvadore Dali</irc:artist>

      <irc:description>Spiffy new Kodak Flash Cubes for your camera!</irc:description>

      <irc:categories>ITVC, Camera, Flash</irc:categories>



      <irc:actors>Joe March, Sally April, Jim Link</irc:actors>

      <irc:rating>Totally Unrated</irc:rating>

      <irc:director>Igor Stravinsky</irc:director>








      <irc:shortdescriptionline1>ITVC Demo Item 2</irc:shortdescriptionline1>


      <irc:shortdescriptionline2>Also created using the ITVC MRSS Generator</irc:shortdescriptionline2>

      <irc:title>Instant TV Channel Demo Two</irc:title>




      <irc:artist>M. C. Escher</irc:artist>




      Enjoy these sweet and tasty canned peaches. The password is abc.


      <irc:categories>ITVC, Peaches, Sweet</irc:categories>



      <irc:actors>Joe May, Sally June, Jim Lock</irc:actors>


      <irc:director>Sven Argot</irc:director>
















        • 1. Re: nested xml export


          There are two ways


          You can assemble your XML as text using text functions with a calculation or script. You can export it as a text file with .xml extension.


          A better way, but it requires some learning,  is to use Export XML using XSLT. You will need to learn some basic XSLT and xPath. If you are going this way, you can export xml at <item> level and combine into <gridrowtitle> with <xsl:for-each>, which is similar to FileMaker Loop.


          XSLT will allow you to change the namespace into "irc:" as well.


          There is a great book on FileMaker XML/XSLT, ignore the old version of FileMaker in title:




          There are also a few templates, you can try them as a starting point.

          1 of 1 people found this helpful
          • 2. Re: nested xml export

            nicolai is correct. the calculated XML would probably need a nested loop to give you the text for the nested XML.


            try to think in terms of how you would just "gather" the text and then add the xml-tags around those fields and/or calculations.



            2 of 2 people found this helpful