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
NRG Software, LLC.
http://www.nrgosft.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.

Under construction. Email me your wish list for improvements.