diff options
Diffstat (limited to 'src/utils/xml-utils.c')
-rw-r--r-- | src/utils/xml-utils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/xml-utils.c b/src/utils/xml-utils.c index 4916d29765f91..dae91fee46f6c 100644 --- a/src/utils/xml-utils.c +++ b/src/utils/xml-utils.c @@ -246,10 +246,10 @@ static void node_to_tnds(struct xml_node_ctx *ctx, xml_node_t *out, xml_node_create_text(ctx, tnds, NULL, "Path", uri); val = get_val(ctx, node); - if (val) { - xml_node_create_text(ctx, tnds, NULL, "Value", val); - xml_node_get_text_free(ctx, val); - } + if (val || !xml_node_first_child(ctx, node)) + xml_node_create_text(ctx, tnds, NULL, "Value", + val ? val : ""); + xml_node_get_text_free(ctx, val); new_uri = add_path(uri, name); node_to_tnds(ctx, new_uri ? out : tnds, node, new_uri); |