On Wed, Aug 21, 2019 at 01:15:36 +0200, Ján Tomko wrote:
A function to automatically format the
xmlns:<prefix>='<uri>'
attribute for per-driver namespaces.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/util/virxml.c | 7 +++++++
src/util/virxml.h | 4 ++++
2 files changed, 11 insertions(+)
diff --git a/src/util/virxml.c b/src/util/virxml.c
index f55b9a362c..11b6031b09 100644
--- a/src/util/virxml.c
+++ b/src/util/virxml.c
@@ -1408,3 +1408,10 @@ virXPathContextNodeRestore(virXPathContextNodeSavePtr save)
save->ctxt->node = save->node;
}
+
Two empty lines between functions, please.
+void
+virXMLNamespaceFormatNS(virBufferPtr buf,
+ virXMLNamespace const *ns)
+{
+ virBufferAsprintf(buf, " xmlns:%s='%s'", ns->prefix,
ns->href());
+}
Reviewed-by: Jiri Denemark <jdenemar(a)redhat.com>