Hi Michael Yes, you are right. But what I mean is, for example: the root element of my XML file has the "MD_Metadata" name. I'm completely sure that in the Schema Grammar this element is included so it is possible to validate the rest of the XML file. And, in this case, everything is correct.
But, I have verified that, if I change this root name by other string (not defined in the schema) then it never reports an error. Not even the first error message that I'm expecting, something like: "The root element is not defined in the schema files" or similar. Is it due to the Parser can't find the root element and then nothing is validated? Please tell me if now I have explained correctly my question. Besides I append the "features configuration" I define in my program before the validation, as you can see the "dynamic" option is activated. parserObject.setFeature("http://xml.org/sax/features/validation", true); parserObject.setFeature("http://apache.org/xml/features/validation/dynamic", true); parserObject.setFeature("http://apache.org/xml/features/validation/schema", true); parserObject.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true); parserObject.setFeature("http://xml.org/sax/features/namespaces", true); Thanks and regards Alberto -- View this message in context: http://www.nabble.com/No-validation-error-message-when-the-root-element-is-erroneous-tf3720894.html#a10412233 Sent from the Xerces - J - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]