Hi All,
I am currently working on parsing an XML document such that
Java objects could be created and stored in the database. I chose to use SAX since I will only be reading the data, creating the objects and populating the DB.
A NullPointerException,
java.lang.NullPointerException
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:658)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:333)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
is generated with the following lines of code:
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser parser = spf.newSAXParser();
XMLReader reader = parser.getXMLReader();
reader.setContentHandler(this);
reader.parse(new InputSource("file:///C|/temp/temp.xml"));
Is the error occuring a result of not being able to locate the file? Is there something missing on the classpath (currently using JDK 1.4)?
Thanks in advance for your help!