XmlDocument xml = new XmlDocument();
string response = _oauth.APIWebRequest("GET", "https://api.linkedin.com/v1/people/~", null,null);
//here response is in xml formate
xml.LoadXml(response);
//XmlNodeList xnList = xml.SelectNodes("/person");
//string firstName = "", lastName = "", headline = "";
//foreach (XmlNode xn in xnList)
//{
// firstName = xn["first-name"].InnerText;
// lastName = xn["last-name"].InnerText;
// headline = xn["headline"].InnerText;
// //string url = xn["url"].InnerText;
return firstName + " " + lastName + " " + headline;
string response = _oauth.APIWebRequest("GET", "https://api.linkedin.com/v1/people/~", null,null);
//here response is in xml formate
xml.LoadXml(response);
//XmlNodeList xnList = xml.SelectNodes("/person");
//string firstName = "", lastName = "", headline = "";
//foreach (XmlNode xn in xnList)
//{
// firstName = xn["first-name"].InnerText;
// lastName = xn["last-name"].InnerText;
// headline = xn["headline"].InnerText;
// //string url = xn["url"].InnerText;
return firstName + " " + lastName + " " + headline;
No comments:
Post a Comment