2
這是爲檢索組成員而生成的xml。我需要從這個XML獲得價值tech \ abc1234。如何從xml中獲取xlink:title的屬性值
<tcm:Trustee xlink:href="tcm:0-61-65552" xlink:type="simple" xlink:title="tech\abc1234" Type="65552" Icon="T65552L0P0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:tcm="http://www.tridion.com/ContentManager/5.0"></tcm:Trustee>
但是當我嘗試獲取屬性值,如:
XElement userList = csClient.GetListXml(grpId, members);
foreach (var eachuser in userList.Elements())
{
logdetails(eachuser.Attribute("xlink:title").Value.ToString());
}
我收到以下錯誤: error The ':' character, hexadecimal value 0x3A, cannot be included in a name.
非常感謝。有效!! – pavan