mco_xml_set_policy

Set the current XML policy.

Prototype

    void mco_xml_set_policy(    /*IN*/ mco_trans_h t, /*OUT*/ mco_xml_policy_t * p );

Arguments

t
The mco_trans_h transaction handle returned by mco_trans_start().
p
The address of a mco_xml_policy_t variable to set the policy.

Description

This function sets the current XML policy.

Return Codes

void
No value returned.

Example

    const char * dbname = "SimpleDb";

    int main(int argc, char* argv[])
    {
        mco_db_h db;
        MCO_RET rc;
        mco_device_t       dev;
        mco_db_params_t    db_params;
        mco_trans_h t;
        mco_xml_policy_t policy;
        ...
        rc = mco_db_open_dev( dbname, simple_get_dictionary(), &dev, 1, &db_params );
        if ( MCO_S_OK != rc )
        {
            rc = mco_db_connect(  dbname, &db );
            ...
            rc = mco_trans_start(db, MCO_READ_ONLY, MCO_TRANS_FOREGROUND, &t);
            if ( MCO_S_OK == rc )
            {
                ...
                mco_xml_get_policy(t, &policy);
                printf("\n\tUsing FIXED float format...\n");
                policy.float_format = MCO_FLOAT_FIXED;
                rc = mco_xml_set_policy(t, &policy); // set new policy
                ...
            }
        }
        ...
    }

Files

Header file:
mcoxml.h
Source file:
mcodb.c
Library:
libmcolib.a