Discussion:
crash when using dom parser to parse an invalid xml file
x***@kodak.com
2003-10-31 00:33:08 UTC
Permalink
Hi,

I am new to this mailing list, so please bear with me if this question had
been asked before.

I am using dom parser to parse an in memory xml string, the parser would
crash the whole application if the xml string is invalid -- for example,
one of the "<" is missing for one of the fields. I thought it would just
throw an exception -- does anybody have any idea how to prevent the crash
from happening?

Regards,
Xuefu
d***@us.ibm.com
2003-10-31 00:52:42 UTC
Permalink
Are you catching the appropriate exceptions? If not, your application will
crash. See the sample applications and the documentation for more
information.

Dave




***@kodak
.com To: xerces-c-***@xml.apache.org
cc: (bcc: David N Bertoni/Cambridge/IBM)
10/30/2003 04:33 Subject: crash when using dom parser to parse an invalid xml file
PM
Please respond
to xerces-c-dev




Hi,

I am new to this mailing list, so please bear with me if this question had
been asked before.

I am using dom parser to parse an in memory xml string, the parser would
crash the whole application if the xml string is invalid -- for example,
one of the "<" is missing for one of the fields. I thought it would just
throw an exception -- does anybody have any idea how to prevent the crash
from happening?

Regards,
Xuefu





---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-***@xml.apache.org
For additional commands, e-mail: xerces-c-dev-***@xml.apache.org
x***@kodak.com
2003-10-31 01:15:19 UTC
Permalink
Thanks for replying. Yes, I tried to catch all exceptions using the catch
(...) phrase. However, the parser didn't throw an exception, and my
application never caught any exceptions. and the crash actually happens
inside the parser code and not my application. I thought there might be
some sort of flags that I could set so that the parser could throw
exceptions in cases such as this.

Regards,
Xuefu




david_n_bertoni@
us.ibm.com To: xerces-c-***@xml.apache.org
cc:
10-30-2003 16:52 Subject: Re: crash when using dom parser to parse an invalid xml file
Please respond
to xerces-c-dev










Are you catching the appropriate exceptions? If not, your application will
crash. See the sample applications and the documentation for more
information.

Dave




***@kodak

.com To:
xerces-c-***@xml.apache.org

cc: (bcc: David N
Bertoni/Cambridge/IBM)

10/30/2003 04:33 Subject: crash when using
dom parser to parse an invalid xml file
PM

Please respond

to xerces-c-dev





Hi,

I am new to this mailing list, so please bear with me if this question had
been asked before.

I am using dom parser to parse an in memory xml string, the parser would
crash the whole application if the xml string is invalid -- for example,
one of the "<" is missing for one of the fields. I thought it would just
throw an exception -- does anybody have any idea how to prevent the crash
from happening?

Regards,
Xuefu





---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-***@xml.apache.org
For additional commands, e-mail: xerces-c-dev-***@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-***@xml.apache.org
For additional commands, e-mail: xerces-c-dev-***@xml.apache.org
d***@us.ibm.com
2003-10-31 01:19:47 UTC
Permalink
Hi,

Well, if the parser is crashing when on an ill-formed document, then that's
a bug. You should put together a minimal document that reproduces the
crash, create a bugzilla reoprt, and attach the document to the report.
But first, make sure you're using the latest version of the parser.

Dave




***@kodak
.com To: xerces-c-***@xml.apache.org
cc: (bcc: David N Bertoni/Cambridge/IBM)
10/30/2003 05:15 Subject: Re: crash when using dom parser to parse an invalid xml file
PM
Please respond
to xerces-c-dev





Thanks for replying. Yes, I tried to catch all exceptions using the catch
(...) phrase. However, the parser didn't throw an exception, and my
application never caught any exceptions. and the crash actually happens
inside the parser code and not my application. I thought there might be
some sort of flags that I could set so that the parser could throw
exceptions in cases such as this.

Regards,
Xuefu




david_n_bertoni@

us.ibm.com To:
xerces-c-***@xml.apache.org

cc:

10-30-2003 16:52 Subject: Re: crash when
using dom parser to parse an invalid xml file
Please respond

to xerces-c-dev











Are you catching the appropriate exceptions? If not, your application will
crash. See the sample applications and the documentation for more
information.

Dave




***@kodak

.com To:
xerces-c-***@xml.apache.org

cc: (bcc: David N
Bertoni/Cambridge/IBM)

10/30/2003 04:33 Subject: crash when using
dom parser to parse an invalid xml file
PM

Please respond

to xerces-c-dev





Hi,

I am new to this mailing list, so please bear with me if this question had
been asked before.

I am using dom parser to parse an in memory xml string, the parser would
crash the whole application if the xml string is invalid -- for example,
one of the "<" is missing for one of the fields. I thought it would just
throw an exception -- does anybody have any idea how to prevent the crash
from happening?

Regards,
Xuefu





---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-***@xml.apache.org
For additional commands, e-mail: xerces-c-dev-***@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-***@xml.apache.org
For additional commands, e-mail: xerces-c-dev-***@xml.apache.org








---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-***@xml.apache.org
For additional commands, e-mail: xerces-c-dev-***@xml.apache.org
x***@kodak.com
2003-10-31 01:33:44 UTC
Permalink
all right, thanks. will file a bug.

I am using xerces 2.3.0.

Regards,
Xuefu




david_n_bertoni@
us.ibm.com To: xerces-c-***@xml.apache.org
cc:
10-30-2003 17:19 Subject: Re: crash when using dom parser to parse an invalid xml file
Please respond
to xerces-c-dev










Hi,

Well, if the parser is crashing when on an ill-formed document, then that's
a bug. You should put together a minimal document that reproduces the
crash, create a bugzilla reoprt, and attach the document to the report.
But first, make sure you're using the latest version of the parser.

Dave




***@kodak

.com To:
xerces-c-***@xml.apache.org

cc: (bcc: David N
Bertoni/Cambridge/IBM)

10/30/2003 05:15 Subject: Re: crash when
using dom parser to parse an invalid xml file
PM

Please respond

to xerces-c-dev






Thanks for replying. Yes, I tried to catch all exceptions using the catch
(...) phrase. However, the parser didn't throw an exception, and my
application never caught any exceptions. and the crash actually happens
inside the parser code and not my application. I thought there might be
some sort of flags that I could set so that the parser could throw
exceptions in cases such as this.

Regards,
Xuefu




david_n_bertoni@

us.ibm.com To:
xerces-c-***@xml.apache.org

cc:

10-30-2003 16:52 Subject: Re: crash when
using dom parser to parse an invalid xml file
Please respond

to xerces-c-dev











Are you catching the appropriate exceptions? If not, your application will
crash. See the sample applications and the documentation for more
information.

Dave




***@kodak

.com To:
xerces-c-***@xml.apache.org

cc: (bcc: David N
Bertoni/Cambridge/IBM)

10/30/2003 04:33 Subject: crash when using
dom parser to parse an invalid xml file
PM

Please respond

to xerces-c-dev





Hi,

I am new to this mailing list, so please bear with me if this question had
been asked before.

I am using dom parser to parse an in memory xml string, the parser would
crash the whole application if the xml string is invalid -- for example,
one of the "<" is missing for one of the fields. I thought it would just
throw an exception -- does anybody have any idea how to prevent the crash
from happening?

Regards,
Xuefu





---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-***@xml.apache.org
For additional commands, e-mail: xerces-c-dev-***@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-***@xml.apache.org
For additional commands, e-mail: xerces-c-dev-***@xml.apache.org








---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-***@xml.apache.org
For additional commands, e-mail: xerces-c-dev-***@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-***@xml.apache.org
For additional commands, e-mail: xerces-c-dev-***@xml.apache.org
Erik Rydgren
2003-10-31 08:19:37 UTC
Permalink
Input of malformed xml should neither throw nor crash. The parse method
should only return false and the error is reported through the
registered error handler.

Have you initialized Xerces before using any of the classes? Are you
linking with the correct runtime? Try parsing your input document with
the DOMCount example. If the crash persists there then you have found a
bug.

/ Erik
-----Original Message-----
Sent: den 31 oktober 2003 01:33
Subject: crash when using dom parser to parse an invalid xml file
Hi,
I am new to this mailing list, so please bear with me if this question had
been asked before.
I am using dom parser to parse an in memory xml string, the parser would
crash the whole application if the xml string is invalid -- for example,
one of the "<" is missing for one of the fields. I thought it would just
throw an exception -- does anybody have any idea how to prevent the crash
from happening?
Regards,
Xuefu
---------------------------------------------------------------------
x***@kodak.com
2003-10-31 18:25:56 UTC
Permalink
yes, domcount app. crashes upon parsing as well.

Regards,
Xuefu



"Erik Rydgren"
<***@man To: <xerces-c-***@xml.apache.org>
darinen.se> cc:
Subject: RE: crash when using dom parser to parse an invalid xml file
10-31-2003 00:19
Please respond to
xerces-c-dev






Input of malformed xml should neither throw nor crash. The parse method
should only return false and the error is reported through the
registered error handler.

Have you initialized Xerces before using any of the classes? Are you
linking with the correct runtime? Try parsing your input document with
the DOMCount example. If the crash persists there then you have found a
bug.

/ Erik
-----Original Message-----
Sent: den 31 oktober 2003 01:33
Subject: crash when using dom parser to parse an invalid xml file
Hi,
I am new to this mailing list, so please bear with me if this question
had
been asked before.
I am using dom parser to parse an in memory xml string, the parser
would
crash the whole application if the xml string is invalid -- for
example,
one of the "<" is missing for one of the fields. I thought it would
just
throw an exception -- does anybody have any idea how to prevent the
crash
from happening?
Regards,
Xuefu
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-***@xml.apache.org
For additional commands, e-mail: xerces-c-dev-***@xml.apache.org
Erik Rydgren
2003-11-03 09:45:01 UTC
Permalink
Then please report the bug in bugzilla and attatch the files that
generates the crash.

/ Erik
-----Original Message-----
Sent: den 31 oktober 2003 19:26
Subject: RE: crash when using dom parser to parse an invalid xml file
yes, domcount app. crashes upon parsing as well.
Regards,
Xuefu
"Erik Rydgren"
Subject: RE: crash
when
using dom parser to parse an invalid xml file
10-31-2003 00:19
Please respond to
xerces-c-dev
Input of malformed xml should neither throw nor crash. The parse method
should only return false and the error is reported through the
registered error handler.
Have you initialized Xerces before using any of the classes? Are you
linking with the correct runtime? Try parsing your input document with
the DOMCount example. If the crash persists there then you have found a
bug.
/ Erik
-----Original Message-----
Sent: den 31 oktober 2003 01:33
Subject: crash when using dom parser to parse an invalid xml file
Hi,
I am new to this mailing list, so please bear with me if this question
had
been asked before.
I am using dom parser to parse an in memory xml string, the parser
would
crash the whole application if the xml string is invalid -- for
example,
one of the "<" is missing for one of the fields. I thought it would
just
throw an exception -- does anybody have any idea how to prevent the
crash
from happening?
Regards,
Xuefu
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
Loading...