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.

Need XLST for XML file help. Nested elements.

Featured Replies

Hello, I am trying to import the below files. I know that the .xsl file is not completely right, but have come close. Problem right now is that the nested elements show up as separate records instead of all the same records. Although fields match.

DNSWellness.zip

Edited by Guest
Updated attached files

In your XML example, there is one incident with two clients. Do you want to create a record for each incident - and if so, how do you intend to handle the multiple clients - or are you importing into a Clients table?

  • Author

No, they need to be in the same record. My current thought process is to import them all into a temp table, then transfer them into their appropriate tables. I have set the temp table up so that it can handle the importing of up to 5 clients, which should be sufficient. The problem is that I still have not been able to grab the client data from the xml file due to their nesting. If I use "" I get the data, but it sees each new section as a separate record.

If I use "" I get the data, but it sees each new section as a separate record.

Yes, because "INCIDENT/*" means "any child node of INCIDENT" - so you are telling it to create a new record for each , or . You should only create a new

and then pick the field values by their section/subsection, e.g.B)

My current thought process is to import them all into a temp table, then transfer them into their appropriate tables.

Why not import them directly to their table, using another stylesheet?

  • Author

You can only import into one table at a time. This stylesheet will create a new record for each . In order to import into a Clients table you would need another stylesheet, where a would be created:

  • Author

You can only import into one table at a time. This stylesheet will create a new record for each . In order to import into a Clients table you would need another stylesheet, where a would be created:

Yes, would import them all into the "temp table", but would still like to create a separate record for each repeating client. Was going to have the person on the other end of the xml file include the incident id with each client so that I could then process the temp table and send the client section to the client table, but still tied to the correct incident. Was think more of something like . Will play around with it to see if I can get that to work. A separate stylesheet would not be that much more trouble, just would like to keep it consolidated if possible.

Was going to have the person on the other end of the xml file include the incident id with each client

That's not really necessary - the stylesheet can lookup the incident id from the parent node.

If you only want to import once, into a temp table, then I believe it would be best to "flatten" the table, i.e. create a record for each client with all the incident data included in it. Then import the client fields into Clients, and incident fields into the Incidents table (with IncidentID validated as unique - so multiple clients will be imported as one incident).

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.