TwitterUserXMLProcessingHandler handler = new TwitterUserXMLProcessingHandler();
XMLReader parser = XMLReaderFactory.createXMLReader();
parser.setContentHandler(handler);
parser.parse(source);
if (handler.getUsers().size() == 0)
throw new RetrievalException("Could not retrieve data for user " + twitterName + "!");
return handler.getUsers().get(0);
} else
throw new RetrievalException("Could not fetch user data for " +
twitterName + "! Status code was " + statusCode + "!");
} catch (Exception e) {
throw new RetrievalException("Could not fetch user data for " +
twitterName + "!", e);
}
}