Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Export Records for a single field, modifies XML text

Featured Replies

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

I am afraid it's one or the other (UTF-8 or returns). If you want to export your data as XML, you can use the built-in XML export format.

...

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.

  • Author

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.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.