XDocument を作成するには、XElement で SPWeb.Groups.Xml を取得する必要があります。
SPSite site = new SPSite(url);
foreach (SPWeb web in site.AllWebs)
{
SPUserCollection spusers = site.RootWeb.SiteUsers;
XElement xeGroup = new XElement("Groups");
xeGroup = new XElement(web.Groups.Xml);}
現在、「「<」文字、16 進値 0x3C は名前に含めることができません」というエラーが発生しています。
情報を取得するための回避策または正しい方法を提案してください。
ご協力いただきありがとうございます。