Jan Les wrote: > I'm using the following code: > > .... > documentFactory.DocumentBuilderFactory.newInstance(); > documentFactory.setAttribute(schemaLanguage, schemaNamespace); > documentFactory.setValidating(validate); > .... > > > I keep reference to a document builder factory, and when I need to to create non-validating parser I simply call documentFactory.setValidating(false) before creating document builder. > When I need to create a validating parser I call documentFactory.setValidating(true) before creating document builder. > > This worked fine with previous releases of Xerces. > > When using with Xerces 2.3.0 an error is generated when parsing with > non-validating parser. The error referes to not defined root element, so even if > validate is set to false, parser looks for a schema. > > Why is so? > I assume that this is because documentFactory has set schemaLanguage, and schemaNamespace attributes. I could not reset these attributes. Can I do this? Any advice?
Set the attribute value to "null". Neeraj --------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]