xmlchecker
Checks a xmlfile against xsd.
📝Syntax
xmlchecker(xmlfile, xsdfile)
[state, errors_detected, warnings_detected] = xmlchecker(xmlfile, xsdfile)
📥Input Arguments
Parameter Description
xmlfile a string: path to the XML file.
xsdfile a string: path to the XSD file.
📤Output Arguments
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.
📄Description

xmlchecker is a tool to check that a xml file is valid against a xsd file.

💡Examples
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
    
🔗See Also
xmldocchecker
🕔Version History
Version Description
1.15.0 initial version
Edit this page on GitHub