2 Replies Latest reply on Jun 22, 2011 11:26 AM by bueller

    Using Variables as file name in xml and xsl import

    CeRaum

      Title

      Using Variables as file name in xml and xsl import

      Post

      Hi all,

      Relatively new to Filemaker, but getting better all the time.

      I'm having a problem using variables during xml imports and keep getting errors along the lines of:

      "XML/XSL information is not enough to proceed with import/export."

      And:

      "XML parsing error:

      unable to open primary document entity ''

      Line Number: 0
      Column Number: 0"

      The second error I get when I manually select the xml file and use a variable for the xsl.

      The scrip works fine if I manually select the files (xml and xsl) and the variables work well when I test them by inserting the file path into a contaner i.e. the path seems to be constructed properly. I even get the same error when I pass the container value to the import.

      So my question is why does FM understand the file path when working with containers but not the xml import function.

      Thanks for any assitance,

      CE

      FM Pro V11

        • 1. Re: Using Variables as file name in xml and xsl import
          CeRaum

          YEAH!

          One of those duh moments. After hours of beating my head against a wall I solved the problem. I was setting the import file as a result of a calculation. Instead it works just fine if I set it to file and enter the name of the variable instead of a file name.

          For clarity:

          Import Records [ XML (from calculation): $xml; XSL (from calculation): $xsl ]

          Does NOT work. Where:

          Import Records [ XML (from file): $xml; XSL (from file): $xsl ]

          DOES work

          I must say this is counter-intuitive. But, heck, what works works.

          I'll be back with my next head banger question,

          CE

          • 2. Re: Using Variables as file name in xml and xsl import
            bueller

            I concur. The XML Import screen clearly states that if you are using a calculation to generate an HTTP or FIle Path use the calculation option. I'm not sure why this fails for file paths.