It will parse the string into a DOM document and validate this document against the schema.
public static validateXML ( string | DOMDocument $xml, string $schema, boolean $debug = false ) : string | DOMDocument | ||
$xml | string | DOMDocument | The XML string or document which should be validated. |
$schema | string | The schema filename which should be used. |
$debug | boolean | To disable/enable the debug mode |
Результат | string | DOMDocument | $dom string that explains the problem or the DOMDocument |