function ApiResponse(ajaxResponse, format) {

    format == "xml" && processXmlResponse(this, ajaxResponse);
    format == "json" && processJsonResponse(this, ajaxResponse);

    function processXmlResponse(_this, xmlResponse) {
        $(xmlResponse).find('response').each(function() {
            _this.currentPage = parseInt($(this).attr('current-page'));
            _this.pages = parseInt($(this).attr('pages'));
            _this.pageSize = parseInt($(this).attr('page-size'));
            _this.total = parseInt($(this).attr('total'));
        });
    }

    function processJsonResponse(_this, jsonResponse) {
        _this.currentPage = jsonResponse.response.currentPage;
        _this.pages = jsonResponse.response.pages;
        _this.pageSize = jsonResponse.response.pageSize;
        _this.total = jsonResponse.response.total;
    }


}
