SAX DefaultHandler throws SAXException trying to get Attributes
I have a class that extends org.xml.sax.helpers.DefaultHandler. In my startElement() method I try to access the Attributes and my program throws a SAXException.
I can't imagine why. If I debug my Attributes are all there. But doing something as simple as System.out.println(atts) throws an Exception:
publicvoid startElement(String namespaceURI, String localName, String qName, Attributes atts)throws SAXException
{
System.out.println("Attributes: " + atts);
}
Which tells me that atts is null or something (but it is not ...) and as such, getLength(), and every other get also throws an Exception.
I am using Java 1.6. Anybody seen this before?
Thanks
Bob

