mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
util: introduce virXMLNamespaceFormatNS
A function to automatically format the xmlns:<prefix>='<uri>' attribute for per-driver namespaces. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
5802dec155
commit
7c3534e0a0
@ -1408,3 +1408,11 @@ virXPathContextNodeRestore(virXPathContextNodeSavePtr save)
|
|||||||
|
|
||||||
save->ctxt->node = save->node;
|
save->ctxt->node = save->node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
virXMLNamespaceFormatNS(virBufferPtr buf,
|
||||||
|
virXMLNamespace const *ns)
|
||||||
|
{
|
||||||
|
virBufferAsprintf(buf, " xmlns:%s='%s'", ns->prefix, ns->href());
|
||||||
|
}
|
||||||
|
@ -261,3 +261,7 @@ struct _virXMLNamespace {
|
|||||||
};
|
};
|
||||||
typedef struct _virXMLNamespace virXMLNamespace;
|
typedef struct _virXMLNamespace virXMLNamespace;
|
||||||
typedef virXMLNamespace *virXMLNamespacePtr;
|
typedef virXMLNamespace *virXMLNamespacePtr;
|
||||||
|
|
||||||
|
void
|
||||||
|
virXMLNamespaceFormatNS(virBufferPtr buf,
|
||||||
|
virXMLNamespace const *ns);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user