I've seen that trying to validate an XML with a schema containing keys, they were ignored, and the XML was considered still valid altough it contained duplicate keys.
![]() |
|
||||||||||
|
DOMDocument->schemaValidate()(no version information, might be only in CVS) DOMDocument->schemaValidate() -- Validates a document based on a schemaОписаниеclass DOMDocument {bool schemaValidate ( string filename ) } Validates a document based on the given schema file. Возвращаемые значенияВозвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки. Смотрите также
DOMDocument->schemaValidate()
nevyn at NOSPAM dot email dot it
18-Dec-2006 05:41
I've seen that trying to validate an XML with a schema containing keys, they were ignored, and the XML was considered still valid altough it contained duplicate keys.
justin at redwiredesign dot com
08-Nov-2006 03:32
In his previous comment, Mike A wrote about validating documents using an XSD. However, you can validate without one. In my case, I needed to ensure that the content entered was just valid XML or not, and I couldn't find an XSD to support that. So I wrote this:
Mike A.
17-Feb-2006 12:03
For more detailed feedback from DOMDocument::schemaValidate, disable libxml errors and fetch error information yourself. See http://php.net/manual/en/ref.libxml.php for more info. |