Validating xml scema
In older versions of PHP5 this function might cause error messages when dealing with namespaces.
In his previous comment, Mike A wrote about validating documents using an XSD. 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.However since libxml does not know where to find the schema file, it will stop the validation if the elements from the referenced namespace, passing also document with invalid xhtml content as valid.The solution was to create a combined schema, which contains import statements for all files matching the referenced schemas: Note that the schema Location tells the validator, where to find the files for the corresponding namespaces.Error 1824: Element 'child_integer': 'Error condition.' is not a valid value of the atomic type 'xs:integer'.in on line 4 I had a tricky issue using this method, i thought it was bug but i realized i misundestood something about namespaces.