Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
10.5
11.0
11.1
11.2
11.3
11.4
11.5
12.0
12.1
12.2
Statistic
FMM
Blog
XML.Colorize
Formats a XML string with color.
Component | Version | macOS | Windows | Linux | Server | iOS SDK | License |
XML | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | Free |
MBS( "XML.Colorize"; XML { ; DarkMode } ) More
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
XML | The XML text to process. | "<test>Hello</test>" | |
DarkMode | Available in MBS FileMaker Plugin 12.1 or newer. Whether to swap colors to use white for text color. Pass 1 for dark mode and 0 for light mode. Default is 0 for light mode. |
0 | Optional |
Result
Returns formatted text or error.
Description
Formats a XML string with color.This colorizes an existing XML text to show to user.
Keys get blue, text value black, attributes in purple.
Text is returned only with colors. You can apply text font and font size with normal FileMaker functions.
Processing time is linear to length, so should be faster than custom functions.
Examples
Colorize a field:
Set Field [ Data::XML ; MBS("XML.Colorize"; Data::XML) ]
Line numbers, color and format:
MBS( "Text.AddLineNumbers"; MBS( "XML.Colorize"; MBS( "XML.Format"; Buckets::Listing)))
See also
Release notes
- Version 12.1
- Added darkMode parameter for XML.Colorize and JSON.Colorize function.
- Version 8.2
- Added XML.Colorize function.
- Fixed XML.Colorize function coloring for attributes.
Example Databases
- CURL/Amazon S3 Buckets
- DynaPDF/List XFA Streams
- Mac only/Script Workspace Context Menu Commands
- Win Only/Snippets for Windows
- XML/XML Colorize
- XML/XML to JSON
Blog Entries
- Neues MBS FileMaker Plugin 12.1
- MBS FileMaker Plugin 12.1 - More than 6700 Functions In One Plugin
- MBS FileMaker Plugin, version 12.1pr1
- XML and JSON Colorize for Dark Mode
- FileMaker Developers in Southern California
- FileMaker records to XML or JSON
- Neues MBS FileMaker Plugin 8.3
- MBS FileMaker Plugin 8.3 released
- Colorize JSON or XML in FileMaker with line numbers
- MBS FileMaker Plugin, version 8.2pr5
Videos
- MBS Plugin Präsentation von der FileMaker Konferenz 2019
- FileMaker Developers in Southern California
- FileMaker Developer Conference 2019 Presentation
Created 8th April 2018, last changed 19th January 2022
XML.ClearVariables - XML.Compact
Feedback: Report problem or ask question.
