xmlpers2.c
来自「PB 熟悉的哥们希望大家可以互相学习一下」· C语言 代码 · 共 35 行
C
35 行
{
/* Person # 2 */
XMLtestDB_oid oid =
{
"12345", MCO_OID(123454321ul, 87654322ul)
};
rc = Person_new(t, &oid, &p_obj);
if (rc)
{
goto err;
}
Person_name_put(&p_obj, "John Travolta", 13);
Person_residence_put(&p_obj, 0, &res);
Residence_where_write_handle(&res, &adr);
Address_country_write_handle(&adr, &cnt);
Country_c_code_put(&cnt, "USA", 3);
Country_name_put(&cnt, "Unated States of America", 24);
Address_city_put(&adr, "Chicago", 7);
Address_street_put(&adr, "Main street, 77", 15);
Residence_since_write_handle(&res, &dat);
Date_day_put(&dat, 16);
Date_month_put(&dat, "May", 3);
Date_year_put(&dat, 1998);
Residence_phone_write_handle(&res, &pho);
Phone_country_put(&pho, 1);
Phone_area_put(&pho, "234", 3);
Phone_number_put(&pho, "3222232", 7);
Person_mobile_write_handle(&p_obj, &pho);
Phone_country_put(&pho, 1);
Phone_area_put(&pho, "555", 3);
Phone_number_put(&pho, "7778899", 7);
Person_description_put(&p_obj, "Haven't you seen the Pulp Fiction yet?", 38);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?