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:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
Statistic
FMM
Blog
XML.Format
Formats XML document.
Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
XML | 6.2 | Yes | Yes | Yes | Yes | Yes |
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
XML | The XML to process. Can be XML as text or the reference returned by XML.Parse function, so you can make several times changes to the XML without parsing it each time. |
"<test>Hello</test>" | |
Flags | Various Flags. Add 1 to ignore errors in xml and continue parsing. This may lead to not everything in the xml being read. Add 8 to remove all namespaces before query to have queries easier. (new in 6.3) |
0 | Optional |
Result
Returns XML or error.
Description
Formats XML document.Adds intention and new line characters to format XML for showing too human.
See also XML.Compact to reverse the formatting.
Examples
Format the document:
MBS("XML.Format"; Canonical XML::Input XML; 1)
Format removing namespace:
MBS( "XML.Format"; "<cfdi:Invoice invoiceTotal=\"450.24\"> </cfdi:Invoice>" ; 8)
Check if XML is valid:
MBS( "XML.Format"; "<hello></Hello>";0 )
Example result: [MBS] Failed to parse XML: Opening and ending tag mismatch: hello line 1 and Hello
See also
Example Databases
- CURL/Amazon S3 Buckets
- DynaPDF/List XFA Streams
- Mac only/Script Workspace Context Menu Commands
- XML/Canonical XML
- XML/XML Test
- XML/XML to JSON
Blog Entries
- FileMaker records to XML or JSON
- News about the MBS FileMaker Plugin 10.2
- Neues MBS FileMaker Plugin 10.2
- MBS FileMaker Plugin 10.2 - More than 6200 Functions In One Plugin
- Fun with While function in FileMaker
- 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 7.5pr8
- MBS FileMaker Plugin 6.2 for OS X/Windows
FileMaker Magazin
Release notes
- Version 7.5
- Improved XML.Format function and xml parsing to better handle blank areas.
Created 20th May 2016, last changed 10th May 2020
XML.ExtractText - XML.GetAttribute
Feedback: Report problem or ask question.

Links
MBS Xojo Plugins