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.

Import XML with multiple childs

Featured Replies

Hi all,

Is it possible to create one parent record and then create multiple child records based on the XML file?

Ricky

What XML file? If you have a XML file with parent and child structure, you can import it twice - using a different stylesheet for each target table.

  • 2 weeks later...
  • Author

Attached is an example of the xml file that I am using. I need to create a stylesheet to import into filemaker. Some of the elements in the xml file do not read for filemaker.

And sometimes there could be more than one article.

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

Cengage

EPAC-123456789

Cengage

Jimmy Page

145 Dart Ave

Akron

44301

OH

USA

false

2

1432

2

9781234567890

Three Cups Of Tea

Jeff Beck

Cengage

0.466

7.95

25

12345

11.925

1432

2

25

Edited by Guest

The way it looks there can be multiple Articles and multiple Packages - and each package can have multiple PackageLines. You need to specify what do you want to import into which table.

  • Author

Essentially there would be three tables...

One for the ShippingAddress or what should be the top level table. The xml should import once into this table.

A table for the articles with the FK of the ShippingAddress table. The xml should import the articles into this table.

Then import the packages into a table. With FK of the articles.

Could I do all this in one import with one stylesheet or do I need to do multiple things?

thanks

Filemaker cannot import into more than one table at a time. You need a specific stylesheet for each table.

Attached are two sample stylesheets, one for importing the order and one for the articles.

Then import the packages into a table. With FK of the articles.

I don't see that Packages have a FK to Articles - only PackageLines do. Anyway, I believe this should be enough to get you started.

Archive.zip

  • Author

I suppose I can add the packages along with the article because it carries the same articlenumber or can I import the package using the article number?

And Thank you very much for all of this.

From what I see in the sample, an Article could be split into several PackageLines - and these lines could be in the same Package and/or in different Packages.

I am not sure what you intend to do with the imported data. If you want to preserve the original structure, then you need 4 tables and 4 imports.

  • Author

I see now, I will create four tables each for the elements, address/article/package/packagelines. and have four imports.

thank you

  • Author

In the Articles element is says

25

I know the value is 25 but could I grab the ordered value "50"?

thanks

  • Author

thank you

Even though this is a physical file for import, how does HTTP request work? What url do you put in for the Import XML script step?

RB

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.