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.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   8.0   8.1    Statistic  


Validates XML against schema.

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

MBS( "XML.ValidateFile"; FilePath; Schema )


Parameter Description Example value
FilePath Native file path to the file to check. "/Users/cs/Desktop/test.xml"
Schema The schema definition. $schema


Returns OK or error.


Validates XML against schema.
Please pass in XML file path and a valid XSD schema.
Return list of errors, so you see them all.
If you use Process.SetCurrentDirectory to change current folder for the application process, the library uses this folder to search for referenced xsd files.

This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.


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 ]

See also

XML.Validate   -   ZipFile.CRCFile

Feedback: Report problem or ask question.

MBS Xojo Chart Plugins