Brian Dunning's FileMaker Custom Functions

XMLEncode ( data )

XML Encode Data with HTML equivalents

  Average rating: 4.2 (31 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:
XMLEncode ( "Smith & Barney" )
  Sample output:
Smith & Barney

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

This custom function can be used to encode data passed via XML to it's HTML equivalent when for use with remote services. Note that the data itself should be encoded, not the whole XML string.

ex:
set field "XML" =
""& XMLEncode( "Smith & Barney" ) &""

 

Comments

Björn   Björn, Sweden
Mar 22, 2011
Works like a charm but there is a typo in the sample output, the function returns the correct "Smith & Barney"
 

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: