Skip 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.

Report Creates My XML...now what?

Featured Replies

  • Newbies

I am so glad to have found a FM forum!

Here's my problem....

I created a report to format my data into a basic xml file. It looks like this:

Now I need to get that into a text file EXACTLY how it appears. None of the export options seem to do the trick. Even if I could just cut and paste the whole thing I would be (marginally) happy.

Thanks.

Vincent

There's 2 approaches. The first is to fake, somehow gather the above into a global text field, then Export Field Contents. There's several ways that could be done. It would't be too hard. But that's not very interesting to me, because I would use the 2nd approach, which is to use an XML export, with an xsl stylesheet to format the data.

If your 2 fields are named "lat" and "lng", and you only export those 2 fields. Then this is the xsl:

<?xml version="1.0" encoding="UTF-8" ?>

xmlns:fm="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fm">

  • Author
  • Newbies

I'll see if it works tomorrow.

What if I want to write all my html through reports?

Is this the difference between the regular and server versions of FM?

I'm not sure exactly what you mean by "write all my html through reports." If you mean "can you write html via xml/xsl exports?" the answer is certainly yes. HTML and XML work well together, and in fact are "siblings", both offshoots of SGML (the near mythical mother of markup languages, seldom {well never} seen, and less understood by mere mortals such as ourselves).

If you look at the xsl I posted, you'll see that I just wrote in the extra and tags (and their end tags). There's other ways to do this, but this is simplest. You can do the same for HTML. Just put your

tags where desired.

The output method would be "html" instead of "xml" in that case.

(P.S. I should have said XHTML, strict. You cannot have any sloppy HTML in an xsl stylesheet. It will stop the processing cold if you have non-closed tags.

must be

, etc.. They did this on purpose. It was the only way to create a reliable markup language.)

Edited by Guest

Is this the difference between the regular and server versions of FM?

No, regular FMP can export XML and you can point it to the XSLT you've created to create the other XML file or the HTML.

You can do this server-side too by using FileMaker Server Advanced too, if you want that HTML created dynamically whenever somebody goes to a certain url.

  • Author
  • Newbies

I'm beginning to see the light. What I meant by forming my html/xml straight is without having to assign a style sheet. If I can get a report of my data to look like on screen exactly the way I want my html/xml code then I should be able to print this to a file.

I started a few xml tutorials...I stopped working in IT in early 99 (Netscape Enterprise and SSJS) to teach high school so I haven't seen ANY of this. Now that I'm back in the biz I feel like a luddite.

If anyone could recommend a good xml/xsl tutorial that gears itself towards FM I would again be grateful.

Also Fenton, I would like to see if you are for hire.

Vince

Edited by Guest

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.