xmlchecker(xmlfile, xsdfile)
[state, errors_detected, warnings_detected] = xmlchecker(xmlfile, xsdfile)
| Parameter | Description |
|---|---|
| xmlfile | a string: path to the XML file. |
| xsdfile | a string: path to the XSD file. |
| Parameter | Description |
|---|---|
| state | a logical: true if the document is valid, false otherwise. |
| errors_detected | a cell of strings: errors detected. |
| warnings_detected | a cell of strings: warnings detected. |
xmlchecker is a tool to check that a xml file is valid against a xsd file.
xml_filename = [modulepath('xml'), '/tests/test_xml.xml'];
if isfile(xml_filename)
xsd_filename = [modulepath('xml'), '/tests/test_xml.xsd'];
[is_valid, errors] = xmlchecker(xml_filename, xsd_filename);
end
| Version | Description |
|---|---|
| 1.15.0 | initial version |