i wrote java code in beanshell but it throws java.lang.NoClassDefFoundError by defining DefaultHandler. I have already imported it, i don't understand why is this exception thrown. My Code looks like here:
import org.xml.sax.helpers.DefaultHandler;
try {
XMLReader xr = XMLReaderFactory.createXMLReader();
**DefaultHandler handler = new DefaultHandler() {
variables
.........
methods(){
..................
}
};**
InputSource file = new InputSource(new StringReader(stringResult));
xr.setContentHandler(handler);
xr.parse(file);
} catch (Ex e) {
.........
}
Thanks