I want to fetch all the keywords used in the component content not in the metadata.
I am using GetListUsedKeywords()
method to get the keywords of the components. I have written a code like below:
XDocument document = null;
XDocument document = XDocument.Parse(compCurrent.GetListUsedKeywords().OuterXml);//ListColumnFilter.XMLListExtended).Replace("tcm:Item", "tcmItem"));
I am getting the result like below in document variable,
<tcm:ListUsedItems xmlns:tcm="http://www.tridion.com/ContentManager/5.0">
<tcmItem ID="tcm:89-43995-1024" Title="Environment" Type="1024" OrgItemID="tcm:89-6332-512" Path="\120 Rolls-Royce.com Schemas\Sustainability" Icon="T1024L0P0" Publication="120 Rolls-Royce.com Schemas" />
<tcmItem ID="tcm:89-43996-1024" Title="Communities" Type="1024" OrgItemID="tcm:89-6332-512" Path="\120 Rolls-Royce.com Schemas\Sustainability" Icon="T1024L0P0" Publication="120 Rolls-Royce.com Schemas" />
<tcmItem ID="tcm:89-48010-1024" Title="Case Study" Type="1024" OrgItemID="tcm:89-7063-512" Path="\120 Rolls-Royce.com Schemas\Functionality Type" Icon="T1024L0P0" Publication="120 Rolls-Royce.com Schemas" />
</tcm:ListUsedItems>
As in this result, The method GetListUSedKeywords()
brings all the keywords(in content as well as metadata). I do not want element with Title "Case Study" , as it belongs to metadata of the component.
How can I filter and fetch only the keywords of the component content and not metadata?
is it possible by GetListUsedKeywords(filter)
by passing filter to the function?
pls help.