# mco_xml_get_policy

> Get the current XML policy.

### Prototype

        void mco_xml_get_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 receive the policy.

### Description

> This function gets the current XML policy.

### Return Codes

void | No value returned.

### Example

        Application snippet:

        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 );

                    ...
                }
            }
            ...
        }

### Files

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