3 Replies Latest reply on Nov 11, 2008 9:38 PM by grinch

    Crashing Filemaker any sugestions or work arounds?

    grinch

      Title

      Crashing Filemaker any sugestions or work arounds?

      Post

      My solution has a text field that containes xml data.  I would like to get xml data into a database.  My original idea was to use the script step of "export field contents".  I name the exported field data export.xml.  Then I import the file using import records from a xml data source.   The result is Filemaker crashes.

       

      I can't figure out what is wrong.  If I take the field data and copy and paste it into a plain text editor (coda) and save the file as export.xml I can use FileMaker's import records from xml file to import it fine.  If I look at the file that is created by the export field contents in my text editor it appears as a well formated xml file.  It will even validate.  The only thing that sets the file appart from any other xml file is that Finder thinks it was created by Final Cut Pro.

       

      Any Idea what is going on, or dose anybody have an alternet meathod to get properly formated xml data from a field into the appropriate fields in a new record.

       

      Thanks

      Chris

       

        • 1. Re: Crashing Filemaker any sugestions or work arounds?
          Vaughan
            

          You need to "parse" the information out of the xml. Exporting the field contents might be putting in field and record delimiters that confuse the import xml parser.

           

          If you have FileMaker Pro Advanced, there are custom functions that can do the parsing. Brian Dunning's web site has a couple like this one:

           

           ExtractData ( XML ; Attribute ; Instance )

          • 2. Re: Crashing Filemaker any sugestions or work arounds?
            Vaughan
               Looking at the ExtractData() custom function, it does not appear to be recursive so it might be possible to enter the body of the function into a normal calculation field and get it to work.
            • 3. Re: Crashing Filemaker any sugestions or work arounds?
              grinch
                

              I have been messing with it for a few hours now, and it seems that filemaker is adding a few special characters into the export text.  This is what is crashing the import xml parser.  After viewing the crash logs, it is indeed the xerces xml parser that is causing the crash.

               

              This custom function may be the best way to go.  The problem is I was hoping to use the imported xml data to updated records via a match field.  I will have to figure out a way to search all the records for a match, if one exists update the record with my data, if none exists create a new one.

               

              I don't think it will be to hard to implement, but dosen't sound like it will be very efficiant.  Any Ideas?

               

              Chris