{get_bookmarks}
<BOOKMARKS id='{$node.node_id}' name="{$node.node_name|escape:'hexentity'}" {if $new_mail eq true}mail_count="{$new_mail}" mail_from="{$new_mail_name}"{/if} k="{$user_k}" wallet="{$k_wallet}"
{foreach from=$get_bookmarks item=bookmark_category}
  <CATEGORY id='{$bookmark_category.node_id}' name='{if $bookmark_category.node_name neq false}{$bookmark_category.node_name|stripslashes|strip_tags}{/if}' new='{if $bookmark_category.sum neq false}{$bookmark_category.sum}{else}0{/if}'>
    {foreach from=$bookmark_category.children item=bookmarks}
    <BOOKMARK id='{$bookmarks.node_id}' name='{$bookmarks.node_name|stripslashes|strip_tags}' new_children='{if $bookmarks.node_user_subchild_count neq false}{$bookmarks.node_user_subchild_count}{else}0{/if}' new_descendants='{if $bookmarks.lastdescendant_created > $bookmarks.last_visit}1{else}0{/if}' changed='{if $bookmarks.node_updated > $bookmarks.last_visit}1{else}0{/if}' />
    {/foreach}    
  </CATEGORY>
{/foreach}
</BOOKMARKS>