@Override
protected LinkedIn2Profile extractUserProfile(final String body) {
LinkedIn2Profile profile = new LinkedIn2Profile();
profile.setId(XmlHelper.get(body, "id"));
for (final String attribute : OAuthAttributesDefinitions.linkedin2Definition.getPrincipalAttributes()) {
profile.addAttribute(attribute, XmlHelper.get(body, attribute));
}
String url = XmlHelper.get(XmlHelper.get(body, LinkedIn2AttributesDefinition.SITE_STANDARD_PROFILE_REQUEST),
"url");
profile.addAttribute(LinkedIn2AttributesDefinition.SITE_STANDARD_PROFILE_REQUEST, url);
return profile;