Thanks folks. As for the MemParse example, the first line had scrolled off
the screen and I was missing out on seeing the error message that is the
first line of the output of the MemParse code.
> -----Original Message-----
> From: Erik Schroeder [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 19, 2001 10:46 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: DOMParser does not report errors for XML that
> are not well-fo rmed
>
>
> Install an error handler, much like you installed a document handler.
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 19, 2001 12:27 PM
> To: [EMAIL PROTECTED]
> Subject: RE: DOMParser does not report errors for XML that
> are not well-fo
> rmed
>
>
> Peter,
> You could also try this out with the MemParse sample code
> that comes along
> with the package. If you modify the
> string in gXMLInMemBuf variable in MemParse.cpp from a well-formed XML
> string to a not well-formed one and try running the sample
> code, you will
> see the behavior that I am seeing. That is, it does not throw an
> XMLException ..... is this expected?
> -Jeetu
>
>
> > -----Original Message-----
> > From: Peter A. Volchek [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 19, 2001 10:19 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: DOMParser does not report errors for XML that
> > are not well-formed
> >
> >
> > ----- 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]
> >
>
> ---------------------------------------------------------------------
> 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]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]