You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Brian Madigan <bu...@yahoo.com> on 2003/01/29 17:58:52 UTC
XNI and DOMParser
using Xerces 2.2.1, the following code throws a null
pointer exception from somewhere inside the DOMParser.
XMLParserConfiguration config =
new CSVParserConfig( );
org.apache.xerces.parsers.DOMParser parser =
new
org.apache.xerces.parsers.DOMParser (config);
java.net.URL url =
TestParserConfiguration.class.getResource(filename);
parser.parse(new XMLInputSource(null,
url.toExternalForm( ), null));
--->stack trace
java.lang.NullPointerException
at
org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown
Source)
at
com.webdeninteractive.xbotts.Mapping.datasource.CSVParserConfig.parse(CSVParserConfig.java:51)
at
org.apache.xerces.parsers.XMLParser.parse(Unknown
Source)
at
com.webdeninteractive.xbotts.Mapping.datasource.TestParserConfiguration.testNewParserConfig(TestParserConfiguration.java:41)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
com.webdeninteractive.xbotts.Mapping.datasource.TestParserConfiguration.main(TestParserConfiguration.java:52)
The same code using the SAXParser runs fine.
CSVParserConfig is the example found in the XNI
manual, with a few modifications to allow it to build
using 2.2.1. Any ideas?
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org