diff --git a/src/utils/xml-utils.c b/src/utils/xml-utils.c index a37a92d44..dae91fee4 100644 --- a/src/utils/xml-utils.c +++ b/src/utils/xml-utils.c @@ -246,7 +246,9 @@ 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); - xml_node_create_text(ctx, tnds, NULL, "Value", val ? 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);