4 #include <prop/proplib.h>
6 int main(int argc
, char *argv
[])
12 /* Create a dictionary capable of holding `argc - 1' objects */
13 pd
= prop_dictionary_create_with_capacity(argc
- 1);
15 errx(EXIT_FAILURE
, "prop_dictionary_create_with_capacity");
18 * For every supplied argument, create a <key, symbol> pair
19 * and store it inside the dictionary
21 for (i
= 1; i
< argc
; i
++) {
22 ps
= prop_string_create_cstring_nocopy(argv
[i
]);
23 prop_dictionary_set(pd
, argv
[i
], ps
);
24 prop_object_release(ps
);
27 /* Output our property list as an XML file */
28 if (prop_dictionary_externalize_to_file(pd
, "./data.xml") == FALSE
) {
29 prop_object_release(pd
);
30 errx(EXIT_FAILURE
, "prop_dictionary_externalize_to_file");
33 prop_object_release(pd
);