You are creating singleton instance, but you forgot to initialize it. Change:
public static ReadXMLFile getInstance() {
if (instance == null) {
instance = new ReadXMLFile();
}
return instance;
}
to
public static ReadXMLFile getInstance() {
if (instance == null) {
instance = new ReadXMLFile();
instance.ParserForObjectTypes();
}
return instance;
}