Hello,
i have this xml/soap from a sharepoint webservice call:
<GetAllUserCollectionFromWeb xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/">
<Users>
<User ID="ID" Sid="ID" Name="XXX" LoginName="XXX" Email="XXX" Notes="" IsSiteAdmin="False" IsDomainGroup="False" Flags="0" />
<User ID="ID" Sid="ID" Name="XXX" LoginName="XXX" Email="XXX" Notes="" IsSiteAdmin="False" IsDomainGroup="False" Flags="0" />
<User ID="ID" Sid="ID" Name="XXX" LoginName="XXX" Email="XXX" Notes="" IsSiteAdmin="False" IsDomainGroup="False" Flags="0" />
<User ID="ID" Sid="ID" Name="XXX" LoginName="XXX" Email="XXX" Notes="" IsSiteAdmin="False" IsDomainGroup="False" Flags="0" />
<User ID="ID" Sid="ID" Name="XXX" LoginName="XXX" Email="XXX" Notes="" IsSiteAdmin="False" IsDomainGroup="False" Flags="0" />
<User ID="ID" Sid="ID" Name="XXX" LoginName="XXX" Email="XXX" Notes="" IsSiteAdmin="False" IsDomainGroup="False" Flags="0" />
<User ID="ID" Sid="ID" Name="XXX" LoginName="XXX" Email="XXX" Notes="" IsSiteAdmin="False" IsDomainGroup="False" Flags="0" />
</Users>
i want deserialize this to a List<> of the this object:
public class Person
{
public string ID { get; set; }
public string Sid { get; set; }
public string Name { get; set; }
public string LoginName { get; set; }
public string Email { get; set; }
public string Notes { get; set; }
public string IsSiteAdmin { get; set; }
public string IsDomainGroup { get; set; }
public string Flags { get; set; }
}
i tryed to use xpath but it doesn't work!
XDocument result = XDocument.Parse(e.Result.ToString());
IEnumerable<XElement> ele = result.XPathSelectElements("/def:GetAllUserCollectionFromWeb/def:Users/def:User");
Error:
Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.
What is wrong? Or how can i solve the problem ? Thanks...