I had to add some code to reproduce that:
Code:import javax.xml.parsers.*;
import org.xml.sax.*;
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setValidating(false);
factory.setNamespaceAware(false);
SAXParser parser;
try {
parser = factory.newSAXParser();
} catch(ParserConfigurationException e) {
println(e.getMessage());
throw e;
} catch(SAXException e) {
println(e.getMessage());
throw e;
}
You are confusing a compilation message (Unhandled exception) with a runtime exception.
When I run the above code, PDE highlights the line with throw e, to show where the compilation error occurs.
The problem is that you correctly catch the exception, but re-throw it, so it needs to be caught at a higher level!
Just get rid of the throw lines (they are not necessary in a simple sketch) and you are good to go.
Note: I want for quite some time to explain how to use Java's newly built in XML parsers (SAX, like you, StAX, or even DOM). It would offer a nice alternative to Processing's one or proXML: built in, no external library, robuster, correct handling of encoding and more complex XML. But slightly harder to use...
I should write a hack about that.