mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
xml: virXMLNamespace: add prefix
We have hardcoded the namespace prefix in various places: 1) the xmlns string stored in the 'href' function 2) the xmlXPathRegisterNs call in each parser 3) all the parsing and formatting code actually dealing with these elements While eliminating the third one is probably a job for an actual XML-aware formatter, let's store the prefix separately here in the virXMLNamespace structure so that future patches can get rid of the first two bullets. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
126ac61ea3
commit
2e2710caff
@ -256,6 +256,7 @@ struct _virXMLNamespace {
|
||||
virXMLNamespaceParse parse;
|
||||
virXMLNamespaceFree free;
|
||||
virXMLNamespaceFormat format;
|
||||
const char *prefix;
|
||||
virXMLNamespaceHref href;
|
||||
};
|
||||
typedef struct _virXMLNamespace virXMLNamespace;
|
||||
|
Loading…
x
Reference in New Issue
Block a user