XML Validation

From: Date: Mon, 23 Sep 2019 07:37:36 +0000
Subject: XML Validation
Groups: php.internals 
Request: Send a blank email to internals+get-107290@lists.php.net to get a copy of this message
Hi Internals, I've been working with XML and validation recently, and the Dom classes do basically everything that is needed. The only thing is that to get the errors of the schema validation we call the validateSchema on the DomDocument, and then use the libxml_get_errors function to actually get the errors. I'd like to propose either adding a flag to the validateSchema to make it throw an error detailing the actual XML errors, or adding a new function that validates and throws with all errors. I'd like to do the same with schemaValidateSource as well. Do you think this is something that should be added to PHP itself, or is it something that should be solved by third party packages?

« previous php.internals (#107290) next »