February 23, 201015 yr Hi all, Is it possible to create one parent record and then create multiple child records based on the XML file? Ricky
February 23, 201015 yr 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.
March 4, 201015 yr 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 March 4, 201015 yr by Guest
March 4, 201015 yr 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.
March 4, 201015 yr 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
March 4, 201015 yr 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
March 4, 201015 yr 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.
March 4, 201015 yr 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.
March 4, 201015 yr Author I see now, I will create four tables each for the elements, address/article/package/packagelines. and have four imports. thank you
March 4, 201015 yr Author In the Articles element is says 25 I know the value is 25 but could I grab the ordered value "50"? thanks
March 5, 201015 yr 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