Accessing inner text of freemarker xml response elements
I'm using the lithium rest API and having a problem accessing elements' contained text values in the XML response. I can get the @attributes values but trying to get the text value of the element returns a freemarker error.
Here's my code:
<#assign groups = rest("/categories/id/platinum_groups/groups/list").groups/>
${groups.@@markup}
<ul class="groups-list">
<#list groups.group as group>
<li><a href="${group.@view_href}">${group.default_role.short_title}</a></li>
</#list>
</ul>
Also: I can see from calling groups.@@markup that each group has an element called default_role which contains sub-elements including short_title. however when i call @@markup on the element it comes up empty.
for example ${group.default_role.@@markup} returns just <default_role href="/roles/id/863" type="role"></default_role>
Is there a different way to access the contained text for an element? The method shown in this post seems like it's just calling it with dot syntax ie: ${recent.message.subject}