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.

Featured Replies

I have a client who is attempting to send a DataFeed formated XML to another vendor(via FTP). It has various products. The vendor needs the XML formatted as shown. Why is this so hard? (in FM7) All it is is an export of my fields over an over (a flat file). I guess I need some sort of XSL but I have no idea how to create it. I just don't know where to start. Any thoughts? Thanks in advance

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

-

-

Adidas FootballcJersey

This is a skill cut, game worn, 2002 Notre Dame jersey

N

399.00

1

217

Blue #s 76-99

Blue Jerseys

http://www.vendor.com/images/

UND254-s.jpg

UND254-t.jpg

UND254-c.jpg

Edited by Guest

Yes you need an XSLT to transform the FM XML grammar into this grammar. Can't really help you beyond the fact that you'll need to learn XSL.

But if you post a sample XML FM export from your file (just one record), I can post back a simple XSLT that works.

  • Author

The vendor wants the data to be formatted as above. The data between the tags is the data from my FM7 DB that I need to put in. Does that clearify?

Thanks

What we would like to have is the raw XML export from FileMaker. Just do an XML export but don't choose an XSL stylesheet (as you don't have one yet). You could do it either with FMPDSORESULT or FMPXMLRESULT (I usually use FMPXMLRESULT, because it can be used for Import also, DSO is export only).

The reason we need this is because we don't know if the names of your fields are exactly the same as the names of the "elements" in the XML above. For FMPXMLRESULT it would likely not matter, because you can use numbers to specify the field's location in the field order. Example: COL[2] is the 2nd field. But the field export order is then very important.

DSO is more name-dependent; which at first may seem easier, but which will break if someone renames a field in FileMaker later (not so good); unless the data is so simple that you can use a completely generic xsl. In your case the VERSION="1" and SKU="UND254" attributes rule out a generic xsl.

  • Newbies

Hi,

i'm new to fileMaker. i'm trying to do the same thing the original poster is looking to do.

rather than wait for jimkent to post his XML, i thought i'd put up mine. and hope that someone could help me out with the XSL.

my XML file:

http://www.alexweinstein.com/stuff/flash/bibliography.xml

but i would be looking to format it as:

<?xml version="1.0" ?>

Albanell

Current Drug Targets

EGFR, HER2, tyrosine kinase inhibitors, TKIs, lapatinib, NSCLC, breast cancer

Albanell J, Gascon P. Small molecules with EGFR-TK inhibitor activity. Curr Drug Targets. 2005;6:259-274. Review. </p><p>

Arora

JPET

tyrosine kinase inhibitors, TKIs, receptor TKIs, RTKIs, lapatinib, GW-572016, ErbB1, ErbB2, breast cancer, NSCLC, metastatic colorectal cancer

Arora A, Scholar EM. Role of tyrosine kinase inhibitors in cancer therapy. J Pharmacol Exp Ther. 2005;315:971-979. Epub 2005 Jul 7. </p><p>

thanks!

asw, I don't see what you want to do exactly. Do you want to Import your xml into Filemaker? Because your source xml is the same as what you say you want at the end, as far as I can tell.

  • Author

This is jimkent. I have attached a file with the XML output using the current FM XML template. Does this help?

VendorExport.txt

  • Author

WOW! It worked well. Thank you so much! I have a few questions though.

1. Does the Output have to have the second line that says:

Is that required for XML? What does it mean?

2. I undersand (I Think) each line you wrote were the column of data is named the "attribute name" but what does the "xsl:template Match..." line mean?

Sorry about these questions, I just want to learn this stuff so I don't have to keep posting.

Add an "exclude-result-prefixes" to the stylesheet declaration, so it looks like this:


The "template-match="/" is saying "begin matching at the root element" (which must be there, and which there is only 1 of). You could also match somewhere further into the document, but matching the root is the usual.

  • Author

That worked perfectly! Thanks!

  • 2 weeks later...

This is my first post in this forum and I hope it gets seen. I too am in the position of not having the time to "learn" XSL as it pertains to FileMaker and have a customer's XML that we need to send data back to them in that format. I have read the comments and suggestions in this topic and have tried to follow along but I'm having trouble implementing the required elements that FileMaker needs in with what our customer wants to see. Is there anyway that someone can help?

If it's not too complex we could likely figure it out. But we'd need to see an example of what xml they want at the end. It would also be useful if you could include a plain XML FileMaker export from your database. You can just export 1 or 2 records; we need to see the fields and export order, and it helps to have some data for testing.

It would be an xml export, FMXMLRESULT, with no xsl stylesheet chosen. That way we can test our xsl to see if it works (always a good idea ;)-). These could be zipped and attached to the post, especially if they are long.

Also, perhaps you should start a new posting thread, in this forum. We'll still see it. This one is kind of long, with all the xml code.

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.