Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5361 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Hello, I want to know if it's possible to import gzipped xml in Filemaker 10 or 11?

I've got it working with the local decoded xml and xslt, the next step is to make it work with a direct URL request.

Therefore I must also send the "Accept-Encoding: gzip" header.

How can I do that in the Import XML HTTP request field?

Thx, Paul

Posted

I don't know how to do that directly, so this is not much of an answer; maybe someone else does.

But it would be possible to use AppleScript to download the file to a known location (using curl), then decompress the file,* then Import XML. It would be automated, so appear to be one step.

I haven't done "gzip", but the command line for gzip (gunzip) looks fairly straightforward.

Posted

I think that the "Accept-Encoding: gzip" header would already be present if FileMaker's implementation of the HTTP request could handle a gzip'ed file. (If not, this is a gross oversight on FileMaker's part.)

Thus your only recourse is to gunzip the file prior to importing via XML. Fenton's idea has merit.

Since you are requesting the file from the a web server, you could either

(a) See if you can get the original web server to provide you with an uncompressed XML file.

(:) Request the file from a different, i.e. local web server that does the conversion for you. You could write a PHP script that takes a URL as a parameter, e.g. http://localhost/fetchXML.php?url=http://example.com/thefile.xml

The php script would fetch the XML file and uncompress it automatically via the fetch since it does support the "Accept-Encoding: gzip" header. The script would the output the XML doc as it's result. The end product would be that you would have a URL to provide FileMaker to get the original gzipped XML document as an unzipped XML document.

  • Newbies
Posted

Thanks for your answers.

I guess the only way is indeed to uncompress it first. The original web server is not gonna provide their users uncompressed xml files.

A bit strange it doesn't work while importing with the XML/XSL with HTTP request option. But I did find out that the webviewer can read it, just as any browser will.

Most important is to make it work on different computers and I have the feeling the solution with a php file and storage on some web server is the way to go.

Anyway, I'll work on something out. Thx!

This topic is 5361 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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