Hi Jason,
Class.forName("Org.apache.xerces.parsers.DOMParser").getDeclaredMethod"parse",paramType);In this call your are trying to call a class that does not exist since:
"Org.apache.xerces.parsers.DOMParser"
should be:
("org.apache.xerces.parsers.DOMParser"Case matters.
Thanks,
Jeffrey Rodriguez
From: Jason Rizer <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Having trouble using reflection to call parse( ); Date: Wed, 11 Apr 2001 20:24:16 -0700 (PDT)
Hello. I'm trying to use reflection to call parse( ) on my DOMParser, but I get an NoSuchMethodException. Anyone see anything wrong with the following code? org.xml.sax.InputSource inputSource = new org.xml.sax.InputSource(aByteStream);
paramTypes[0] = Class.forName("org.xml.sax.InputSource");
objArgs[0] = inputSource;
method = Class.forName("Org.apache.xerces.parsers.DOMParser").getDeclaredMethod("parse", paramType);
method.invoke(domParser, objArgs);
I'm able to reflect setIncludeIgnorableWhitespace( ), but for some reason this one fails.
-Jason
__________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
