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.

xml-result to dso-result

Featured Replies

LS,

I am trying to build a xml-file based on an xml-result export.

I want it to look like :

<data>

<record>

<ID>1</ID>

<name_last>Miltenburg</name_last>

<name_first>Joost</name_first>

...

</record>

</data>

I have the xml-result : (part)

<METADATA>

<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="id" TYPE="TEXT"/>

<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="name_last" TYPE="TEXT"/>

<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="name_first" TYPE="TEXT"/>

...

</METADATA>

What I want is to dynamically get all the different values of the NAME-attributes of the field elements. How do I do that ? That way I'd only have to write one xsl for all my exports.

So it would be a loop within the looping of the records.

Any help would be appreciated...

Try doing this for each fmp:COL:

<xsl:variable name="pos" select="position()"/>

<xsl:element name="{../../../fmp:METADATA/fmp:FIELD[$pos]/@NAME}">

<xsl:value-of select="fmp:DATA"/>

</xsl:element>

Note that this will fail if your field names are not valid element names (e.g. they contain spaces).

Exporting as FPMDSORESULT would probably be even simpler.

  • 7 months later...
  • Author

Thnx !

I should have figured this out myself...

You are right about the FPMDSORESULT remark. However, this has been deprecated for quite a while now. This gives me some future proofing, for my xml exports.

Thnx again... :laugh:

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.