Jump to content

Some advice on XML imports requested


jman1

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

Recommended Posts

Some advice on XML imports requested

Hi everyone

I am a little behind with FMP, I am on 5.5. I wanted to ask if I am understanding correctly that the newer versions of FMP will import XML files and create a data base from them reflecting the parent, child and leaf nodes with the attributes. Is this similar as say when I import a excel spread sheet type import.

From my reading so far it looks like I have to set up a style sheet to map the incoming data to.

Tips or advice as to should I upgrade to FMP 6,7 or 8 or I am just understanding wrong.

I am just learning XML so I may not be explaining this totally correct, please bear with me.

Thanks

Joe

Link to comment
Share on other sites

Yes, later versions can Import XML and create a table from the result. But they can only import into 1 table at a time, just like any other import. So, if you want your XML all into 1 table, then 1 import will do. Otherwise you'd need to import the parent nodes into a table, do another import to get the children into another table, etc.. Because XML is hierarchical, you can "reach up" and bring the parent ID into the child table(s).

You need an XSLT stylesheet (or stylesheets, one for each import*) because FileMaker can only import xml in its own format, FMPXMLRESULT. It basically lists the fields at the top, then the data below, within specified FileMaker elements.

There are several example xslt at FileMaker's XSLT Library page:

http://www.filemaker.com/products/technologies/xslt_library.html

Simpler ones are:

http://transfer.filemaker.com/collection/One2Many.zip

http://transfer.filemaker.com/collection/XMLExamples.zip

The standard book for FileMaker xml is Beverly Voth's:

http://www.moonbow.com/xml/

It was written for FileMaker 6, and you'd be getting FileMaker 8.5 (you should), but the xml stuff has not changed (though the import has become more stable, I think). And importing in general become much easier in 7; you can see the order; pre-7 was a little painful to edit.

FileMaker 8/8.5 also introduced tools to assist with specifying external files, which simplify import/exports considerably.

*I imagine you could just have 1 stylesheet, and use the FileMaker Import Order dialog to match different fields for each of the different tables. But it's easier to just make another stylesheet. The beginning of the stylesheets and general structure is much the same, so it's not like starting over.

[ Also, you want to use a decent text editor, such as BBEdit, or its free sibling TextWrangler, which has syntax coloring, and/or get a dedicated XML editor, such as ExchangerXML, which has a free version at:

http://www.freexmleditor.com/

I also use the free TestXSLT for previewing transformations, which can be found here (along with a lot of other free software):

http://www.entropy.ch/software/macosx/

If you have BBEdit, also get the Glossary (now Clippings), at the above page:

BBEdit XSLT Language Glossary ]

Edited by Guest
Link to comment
Share on other sites

Hi Fenton

Thanks bunches. You have spurred me on my way. Actually you have helped with more than one problem. On another post I was having problems opening CSV files and my upgrade to 7.0 took care of that. I only went with 7 because it was readily available. I did check B&N and borders but neither one had beverlys book. I did pick up a couple other generic XSTL just for browsing. I did download exchangerXML and that looks complex.

Just a FYI I have read many of your posts and responses prior to this and they have been very helpful in other areas.

just on a rambling end the way i am understanding so far is FMP needs the XSLT style sheet as a translator.

I am sure i will have more questions soon

thanks

Joe

Link to comment
Share on other sites

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