private List<Friend> buildFriendsEntryList(XmlDocument x)
{
XmlNodeList msgsNodes = x.SelectNodes("/response/user");
if (msgsNodes.Count>0)
{
List<Friend> friendList = new List<Friend>();
foreach (XmlNode msgNode in msgsNodes)
{
Friend friend = new Friend();
XmlUtils.UseNode(msgNode);
friend.Id = XmlUtils.Int(FriendFields.Id);
friend.FirstName = XmlUtils.String(FriendFields.FirstName);
friend.LastName = XmlUtils.String(FriendFields.LastName);
friend.NickName = XmlUtils.String(FriendFields.NickName);
friend.Rating = XmlUtils.Int(FriendFields.Rating);
friend.Sex = (FriendSex)XmlUtils.Int(FriendFields.Sex);
friend.BirthDate = XmlUtils.String(FriendFields.BirthDate);
friend.City = XmlUtils.Int(FriendFields.City);
friend.Country = XmlUtils.Int(FriendFields.Country);
friend.Timezone = XmlUtils.String(FriendFields.Timezone);
friend.Photo = XmlUtils.String(FriendFields.Photo);
friend.PhotoMedium = XmlUtils.String(FriendFields.PhotoMedium);
friend.PhotoBig = XmlUtils.String(FriendFields.PhotoBig);
friend.Online = XmlUtils.Bool(FriendFields.Online);
friend.Lists = this.buildFriendsList(msgNode.SelectNodes("lists/list/item"));
friend.Domain = XmlUtils.String(FriendFields.Domain);
friend.HomePhone = XmlUtils.String(FriendFields.HomePhone);
friend.MobilePhone = XmlUtils.String(FriendFields.MobilePhone);
friend.HasMobile = XmlUtils.Bool(FriendFields.HasMobile);
friend.University = XmlUtils.Int(FriendFields.University);
friend.UniversityName = XmlUtils.String(FriendFields.UniversityName);
friend.Faculty = XmlUtils.Int(FriendFields.Faculty);
friend.FacultyName = XmlUtils.String(FriendFields.FacultyName);
friend.Graduation = XmlUtils.Int(FriendFields.Graduation);
friendList.Add(friend);
}
return friendList;
}
return null;
}