init_db: Change origin of value from text to attribute 53/308153/1
authorYoungjae Cho <y0.cho@samsung.com>
Thu, 14 Mar 2024 09:12:52 +0000 (18:12 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Thu, 14 Mar 2024 09:26:02 +0000 (18:26 +0900)
A <key> element of model-config.xml has changed to have attribute @value
and it replaces the role of the text node.
 - As-is: <key name="tizen.org/feature/nlp" type="bool">false</key>
 - To-be: <key name="tizen.org/feature/nlp" type="bool" value="false"/>

This is because, it looks better when the <key> has @type="enum". Such
a <key> should have a child <enum> element. And if the change had not
made, the text value of <key> would have followed the </enum>, which
looks bad.

Change-Id: I227d9271a6fbfb77308fb197b503edb87c2f332c
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/init_db/system_info_db_init.c

index 1c2715349a5ac947819cc1a53e976f617b171151..25ea4fa498cb3064c243df3c0999ddcabac5dfcb 100644 (file)
@@ -355,7 +355,7 @@ static int system_info_get_values_config_xml(const char *db_path, const char *pa
                                continue;
                        }
 
-                       value = (char *)xmlNodeListGetString(doc, cur_node->xmlChildrenNode, 1);
+                       value = (char *)xmlGetProp(cur_node, (const xmlChar*)"value");
                        if (!value) {
                                xmlFree(name);
                                xmlFree(type);