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:
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
Validates XML against schema.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
XML | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
FilePath | Native file path to the file to check. | "/Users/cs/Desktop/test.xml" |
Schema | The schema definition as xml text. With version 10.2 can also be file path. |
$schema |
Returns OK or error.
Validate a file in a folder:
Set Variable [ $r ; Value: MBS( "Process.SetCurrentDirectory"; "/Users/cs/Documents/todo/XML Validate/") ]
Set Variable [ $result ; Value: MBS("XML.ValidateFile"; "test.xml"; XML Validation::Schema) ]
Set Field [ XML Validation::Result ; $result ]
Validate all in one folder:
# set folder
Set Variable [ $r ; Value: MBS( "Process.SetCurrentDirectory"; "/Users/cs/Desktop/XML Validate") ]
#
# validate file
Set Field [ XML Validation::Result ; MBS("XML.ValidateFile"; "test.xml"; "generalInvoiceRequest_450.xsd") ]
#
# folder contains xmldsig-core-schema.xsd, xenc-schema.xsd, generalInvoiceRequest_450.xsd and test.xml
This function checks for a license.
Created 6th March 2018, last changed 22nd April 2020