public static function buildPaginationElement($total_entries = 0, $total_pages = 0, $entries_per_page = 1, $current_page = 1)
    {
        $pageinfo = new XMLElement('pagination');

        $pageinfo->setAttribute('total-entries', $total_entries);
        $pageinfo->setAttribute('total-pages', $total_pages);
        $pageinfo->setAttribute('entries-per-page', $entries_per_page);
        $pageinfo->setAttribute('current-page', $current_page);

        return $pageinfo;
    }