----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 19, 2001 7:31 PM
Subject: DOMParser does not report errors for XML that are not well-formed
> I am using a DOMParser instance to load XML from a string or a file to a
DOM
> by calling the parse(InputSource...) method on the string. When the XML
> string is not well-formed, I do not get any exceptions (I am catching
> XMLException while parsing).
>
> So I looked at the MemParse sample code which uses a SAXParser instance to
> do the same thing and which has also set error handlers and document
> handlers on the SAXParser instance. I modified the XML string in the
sample
> code so that it is no more well-formed. It too did not report any errors
as
> well. Is this an expected behaviour? If so, then does one have to set
custom
> document handlers on a parser instance and throw exceptions if an XML that
> is parsed is not well-formed? Or is there some other way to do it as well?
>
> Thanks in advance,
> Jeetu
>
Didn't you forget to call parser.parse() ?
Post the piece of code where you initializes the InputSource and sets the
Parser.
Peter A. Volchek
Software Engineer
Metis International, Inc.
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]