/* Returns CR_OK upon successfull completion, an error code otherwise.  */
enum CRStatus cr_om_parser_simply_parse_buf(const guchar *a_buf, gulong a_len, enum CREncoding a_enc, CRStyleSheet **a_result)
/* Returns CR_OK upon successfull completion, an error code otherwise.  */
enum CRStatus cr_om_parser_simply_parse_buf(const guchar *a_buf, gulong a_len, enum CREncoding a_enc, CRStyleSheet **a_result)
{
        CROMParser *parser = NULL;
        enum CRStatus status = CR_OK;
        parser = cr_om_parser_new (NULL);
        if (!parser) {
                cr_utils_trace_info ("Could not create om parser");
                cr_utils_trace_info ("System possibly out of memory");
                return CR_ERROR;
        }
        status = cr_om_parser_parse_buf (parser, a_buf, a_len,
                                         a_enc, a_result);
        if (parser) {
                cr_om_parser_destroy (parser);
                parser = NULL;
        }
        return status;
}