Brian Dunning's FileMaker Custom Functions

XMLindent ( XML ; whiteSpace ; indentLevel )

Recursive function to add indents to XML or any text for readability

  Be the first to rate this function Log in to vote

Mark Geerdes   Mark Geerdes - Show more from this author
Technology By Design

Share on Facebook Share on Twitter

  Sample input:
XMLindent ("Some Text" ; " " ; 1 )
  Sample output:
" Some Text"

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

This is a convenience function to add white space to the beginning of your XML. WhiteSpace is your padding, so insert the number of spaces, or tabs that you want to use. indentLevel is how many times to add your whiteSpace to the beginning of your XML. This is best used along with the XMLPrettyPrint custom function.



Log in to post comments.


Note: these functions are not guaranteed or supported by 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 19 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: