Platforms to show: All Mac Windows Linux Cross-Platform

Back to XMLValidatorMBS class.

XMLValidatorMBS.Constructor(File as FolderItem)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method XML MBS Util Plugin 20.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The constructor taking file path to XML file.
Example
Dim f As FolderItem = SpecialFolder.Desktop.Child("schema.txt")
Dim v As New XMLValidatorMBS(f)

May raise an XMLException if the XML can't be parsed or the validator can't be initialized.
XML should have unix line endings (char 10), be saved as UTF-8 and itself a valid XML, so we can parse it corectly.

See also:

XMLValidatorMBS.Constructor(XMLSchema as String)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method XML MBS Util Plugin 19.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The constructor taking XML text.

May raise an XMLException if the XML can't be parsed or the validator can't be initialized.

For MBS Plugin 20.2 this function accepts also a file name/path to initialize.
XML should have unix line endings (char 10), be saved as UTF-8 and itself a valid XML, so we can parse it corectly.

See also:

XMLValidatorMBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method XML MBS Util Plugin 19.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The destructor.

XMLValidatorMBS.Message(index as Integer) as XMLValidatorMessageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method XML MBS Util Plugin 19.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries a message by index.

Index from 0 to MessageCount-1.

XMLValidatorMBS.Messages as XMLValidatorMessageMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method XML MBS Util Plugin 19.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries array of messages recorded while validating.

XMLValidatorMBS.ValidateFile(file as FolderItem) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method XML MBS Util Plugin 19.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Validates XML file against a XML schema.
Example
Dim f As FolderItem = SpecialFolder.Desktop.Child("schema.txt")
Dim v As New XMLValidatorMBS(f)

Dim t As FolderItem = SpecialFolder.Desktop.Child("test.xml")
Dim r As Integer = v.ValidateFile(t)

Validate a document tree in memory.
Returns 0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.

See messages array for the logged error and warning messages.
Please pass in XML file path and a valid XSD schema.

Use SetCurrentWorkingDirectory with file.parent to set working directory if needed.

XML should have unix line endings (char 10), be saved as UTF-8 and itself a valid XML, so we can parse it corectly.

See also:

XMLValidatorMBS.ValidateFile(path as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method XML MBS Util Plugin 19.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Validates XML file against a XML schema.

Validate a document tree in memory.
Returns 0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.

See messages array for the logged error and warning messages.
Please pass in XML file path and a valid XSD schema.

Use SetCurrentWorkingDirectory with file.parent to set working directory if needed.

XML should have unix line endings (char 10), be saved as UTF-8 and itself a valid XML, so we can parse it corectly.

See also:

XMLValidatorMBS.ValidateString(text as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method XML MBS Util Plugin 19.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Validates XML text against a XML schema.

Validate a document tree in memory.
Returns 0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.

See messages array for the logged error and warning messages.

XML should have unix line endings (char 10), be saved as UTF-8 and itself a valid XML, so we can parse it corectly.

Some examples using this method:

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...