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

Export Records for a single field, modifies XML text


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

Recommended Posts

Posted

I'm trying to use Export Records on a single record to export a single field containing XML code. The file needs to be in UTF-8 format, which is why I'm using Export Records instead of Export Field Contents. I'm exporting as a Tab separated file.

The problem I'm having is that the resulting XML code is malformed because the carriage returns are stripped out and there is one single line.

Is there a way force FileMaker to keep the carriage returns so the code is correct?

When I use Export Field Contents the code is unchanged.

Thanks

Posted

...

The problem I'm having is that the resulting XML code is malformed because the carriage returns are stripped out and there is one single line.

Is there a way force FileMaker to keep the carriage returns so the code is correct?

Actually the carriage returns aren't stripped out. They are converted to "vertical tab" characters. Either way you have grief since it isn't working as you would like.

Since XML doesn't necessarily need carriage returns at all to be valid, you might try simply removing all returns in your source text and making a single-line XML file. This would only be a viable option if the data you are encoding in the XML itself has no line breaks and if you don't need your XML output to be friendly human-readable.

XML export is the best way to go, but you do have another option to export using tab-delimited and have multi-line output. That would be to put each line of your XML text in a separate record in a table. (It is easiest to create a new table specifically for this export feature.) Export the one field from this table as tab-delimited.

Posted

Removing carriage returns beforehand might be a good way around the problem. The ultimate goal is automation so I don't care if the files are human readable. I'll try this out.

This topic is 5370 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.