diff options
author | Cy Schubert <cy@FreeBSD.org> | 2018-12-06 05:04:28 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2018-12-06 05:04:28 +0000 |
commit | 8a36c5c2ca4d1f8a900ca3d9ffde40b96463def7 (patch) | |
tree | b9a3166587c75d5325dc46c7c83ca435f2e54917 /src/utils/xml-utils.c | |
parent | 765ef8a7642d07aa9616f2b1a9cdebb8e3552f6a (diff) |
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); |