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



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

Reply via email to