I have a MyHandlerBase which handles errors, fatalerrors and warnings. I
never get these handler errors at all!! I have set the setErrorHandler() to
this handler.

The files which I have are 

test.dtd (Wrong)

<?xml version="1.0"?>
<!ELEMENT PARENT ((CHILD*)+,NAME)>
<!ELEMENT CHILD (MARK?|NAME+)?>
<!ELEMENT MARK EMPTY>
<!ATTLIST MARK
            NUMBER ID #REQUIRED
            LISTED CDATA #FIXED "yes"
            TYPE (natural|adopted) "natural">
<!ELEMENT NAME (LASTNAME?,FIRSTNAME+)*>
<!ELEMENT LASTNAME (LNAME)>
<!ELEMENT LNAME (#PCDATA)>
<!ELEMENT FIRSTNAME (#PCDATA)>
<!ENTITY STATEMENT "This is well-formed XML">

tst.dtd

<?xml version="1.0"?>
<!DOCTYPE FIRST SYSTEM "test.dtd">
<FIRST Ver="1.0" Rev ="0.1">
 FirstData
 <SECOND>
  SecondData
  <THIRD>
    ThirdData
  </THIRD>
  <FOURTH>
  FourthData
  </FOURTH>    
 </SECOND>

  <SECOND>
  SecondData1
  <THIRD>
    ThirdData
  </THIRD>
 </SECOND>
</FIRST>


Kiran



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 04, 2000 4:57 PM
To: [EMAIL PROTECTED]
Subject: Re: Unhandled exception while parsing





You will have to provide a minimal sample file(s) that show this problem.
This doesn't give me any problems when I try what it sounds like you are
doing. Basically, if the file doesn't exist, an error should be sent to
your error handler. If you continue parsing after that, you are taking your
chances that you might cause such an exception.

----------------------------------------
Dean Roddey
Software Weenie
IBM Center for Java Technology - Silicon Valley
[EMAIL PROTECTED]



[EMAIL PROTECTED] on 04/04/2000 04:13:28 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  Unhandled exception while parsing



I have an XML file which has a DTD file name which is invalid for the XML
src file. I do have a
XMLException handler in my code. I use validating progressive parsing and
it
looks that they is a bug in the code while doing parseNext
(ScanNext->peekNextChar) it encounters an invalid memory reference and
crashes. The workaround is to have a catch (...) handler which is not good
programming.

Any suggestions.
Kiran


Reply via email to