My C# TBB returns Keywords from a specific Category as XML:
XmlDocument keywordsXml = new XmlDocument();
keywordsXml.LoadXml(cat.GetListKeywords().OuterXml);
Item output = package.CreateXmlDocumentItem(ContentType.Xml, keywordsXml);
package.PushItem("MyKeywords", output);
I see in Template Builder that the TBB return results but not sure how to consume this XML in my Razor template. I would like to get Title
of each Keyword. Below is what TBB returns:
<tcm:ListKeywords xmlns:tcm="http://www.tridion.com/ContentManager/5.0" Managed="0">
<tcm:Item ID="tcm:41-117739-1024" Title="Keyword1 Title" Icon="T1024L0P0" Type="1024" IsNew="false" Modified="2017-10-16T06:52:15" Key="Keyword1 Title" IsAbstract="false" IsRoot="true" CategoryID="tcm:41-12269-512" CategoryTitle="Category Title"/>
<tcm:Item ID="tcm:41-117740-1024" Title="Keyword2 Title" Icon="T1024L0P0" Type="1024" IsNew="false" Modified="2017-10-16T06:52:31" Key="Keyword2 Title" IsAbstract="false" IsRoot="true" CategoryID="tcm:41-12269-512" CategoryTitle="Category Title"/>