Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   7.6    Statistic  

XML.Format

Formats XML document.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
XML 6.2 Yes Yes Yes Yes Yes

MBS( "XML.Format"; XML { ; Flags } )

Parameters

Parameter Description Example value
XML The XML to process. "<test>Hello</test>"
Flags Optional
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

Result

Returns XML or error.

Description

Formats XML document.

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

Example Databases


XML.ExtractText   -   XML.GetAttribute

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins