3 Replies Latest reply on Apr 5, 2012 6:37 AM by beverly

    How to build an XML-export

    Jan_Poos

      I am expoting data from a FM database into a web based financial webapp. They require their own taxonomy (namespace).

      I create a layout, containing in the tab order only the fields i want to export, named after the tags from their namespace. For each record in the found set i want to export, a loop goes through every field, needed in the export, using the tab order (Go to next Field). For each field the tags and content are added to a variable.

      After finishing, i set the variable to a global field an export it to an XML file.

      The file that was created must be loaded into BBEdit and reflowed as XML in order to create a file that is accepted by the web app.

       

      I have two questions;

      1. their must be a simpler way of doing this
      2. How can i prevent the BBEdit step? What is going on while reflowing and how can i include the in my export?
        • 1. Re: How to build an XML-export
          mbraendle

          Look at Export Records ..., Type XML. You can specify an XSL transformation (a so-called XSLT stylesheet) that transforms the FileMaker XML grammar to the grammar required by the financial app. No need to work with variables and global fields and BBEdit.

           

          If you are not fluent with XSLT: There are some XSLT experts in the TechNet community (e.g. Beverly Voth, me, and others) who could help. For this, however, we need to know the target grammar (or XML Schema) of the financial app and the field names of your database.

          • 2. Re: How to build an XML-export
            RubenVanDenBoogaard

            Hi Jan,

             

            When you export text using the Export Field Contents step your text is formatted UTF-16 and you want UTF-8.

            The easiest way is to use a plugin like the free 360Works ScriptMaster to save the contents of the field to a file.

             

            Hope that helps!

             

            Best regards,

             

            Ruben van den Boogaard

            Infomatics Software

            ruben@infomatics.nl

            • 3. Re: How to build an XML-export
              beverly

              An "old-fashioned" way is to loop through the calculated-xml variable you created and push to a temporary table (one record, one field for EACH "line" - return delimited value). Then just export that field (all the records) as Tab-delimited. You have UTF-8!

               

              But the plug-ins are great, too.

               

              Beverly