My own code caused the problem. Sorry for the spam. Now I have a lot of faith in xerces parser now. BTW: anyone knows when xerces-j-2 is available for a big time? -----Original Message----- From: Richard Wu [mailto:[EMAIL PROTECTED]] Sent: July 23, 2001 2:55 PM To: '[EMAIL PROTECTED]' Subject: XMLParser throws out NullPointerException with a normal InputSour ce I have run into NullPointerException thrown out almost at the end of an XML document process by org.apache.xerces.framework.XMLParser.java on line 969. A closer look at the code indicates the call, fScanner.parseSome(true), throws this exception, after all the element events are fired off. Here is my driver code which looks normal. Anyone can help find what causes the problem here? My code or xerces' code? InputSource inputSource; inputSource = new InputSource("CATALO.xml"); XMLReader saxParser = (XMLReader)Class.forName(parserName).newInstance(); saxParser.setContentHandler(auto); saxParser.setErrorHandler(auto); //saxParser.setFeature("http://apache.org/xml/features/validation/dynamic",t rue); saxParser.setFeature( "http://xml.org/sax/features/validation",false); saxParser.setFeature( "http://xml.org/sax/features/namespaces",true ); saxParser.setFeature( "http://apache.org/xml/features/validation/schema",true ); saxParser.parse(inputSource); Thanks! Richard Wu