Brian Dunning's FileMaker Custom Functions

GetListAsXML ( theList ; Element )

Easily convert a list to XML

  Average rating: 4.5 (34 votes) Log in to vote

Andy Knasinski   Andy Knasinski - Show more from this author
nrg software, llc.
http://www.nrgsoft.com

Share on Facebook Share on Twitter

  Sample input:
GetListAsXML ( "Value 1¶Value 2¶Value 3" ; "Value" )
  Sample output:
Value 1
Value 2
Value 3

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Recursive function to convert a list of values (return delimited) to XML syntax

 

Comments

comment   comment, VR
Aug 6, 2009
I'm not sure why this would be needed, but if so, it can be calculated directly without recursion:

Let ( [
openTag = "<" & elementName & ">" ;
closeTag = "<" & elementName & "/>"
] ;
openTag & Substitute ( listOfValues ; ¶ ; closeTag & ¶ & openTag ) & closeTag
)
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: