Do not set validation to true.   Setting validation to true will overwrite
the dynamic switch, and always validate even DTD does not exist, and thus
error.

Just set validation/dynamic to true is enough, which will validate only if
grammar exists.

Tinny

Drew Tennenbaum wrote:

> I am using an XML2Reader object (I called it 'parser') to read in a
> buffer. I am reusing this object between two buffers. In other words I
> do not delete the 'parser' object.
>
> I have two XML buffers:
>
> One has a DTD within the file
>
> and the second has no DTD at all (neither referenced or in the buffer)
>
> When I pass the second buffer into parser->parse I get the validation
> errors because the parser is still using the DTD rules from the first
> parse. Is there a way to 'reset' the parser to a clean state. I have the
> features set so that validation is set to true and the
> validation/dynamic is also set to true (only validate if a DTD exists).
>
> Any ideas on how to get rid of the validation errors in the second
> buffer when no DTD exists?
>
> Thanks,
> Drew
>
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the TenFold Postmaster ([EMAIL PROTECTED]).
> **********************************************************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to