I used to run my unit tests using Android Unit Test but switched to Java Unit Test using Robolectric. I noticed a difference in using the SaxParser DefaultHandler. Basically, the Android sax parser would populate "localName" but when run under Robolectric using the Java VM localName is empty, and qname seems to contain the value I should use.
Here is the method I am refering too:
import org.xml.sax.helpers.DefaultHandler;
public abstract class BaseParser extends DefaultHandler
{
@Override
public abstract void startElement(String uri, String localName, String qName, Attributes attributes);
}
Anyone else notice this strange occurence or can fix it?