Li Zhang wrote:
> The problem is although there's an element ("Abbreviation" - see 
> below xml and dtd) in the xml file which is not defined in the 
> dtd file, I haven't got any exception. However when I use 
> Microsoft XML Notepad I got an error message about the undefined 
> element.

In order to "see" non-fatal errors, you must register an error
handler. For example:

  DOMParser parser = new DOMParser();
  parser.setErrorHandler(new MyErrorHandler());

In addition, there is an error in your DTD:

> <!ELEMENT mystore items>

Should be:

<!ELEMENT mystore (items)>

-- 
Andy Clark * IBM, JTC - Silicon Valley * [EMAIL PROTECTED]

Reply via email to