mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
util: xml: Remove virXMLParseString
Most callers use virXMLParseStringCtxt. Convert the last use case and remove the helper. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
f1cd95cc28
commit
5d2f69aa68
@ -28851,7 +28851,7 @@ virDomainDefSetMetadata(virDomainDef *def,
|
||||
if (metadata) {
|
||||
|
||||
/* parse and modify the xml from the user */
|
||||
if (!(doc = virXMLParseString(metadata, _("(metadata_xml)"))))
|
||||
if (!(doc = virXMLParseStringCtxt(metadata, _("(metadata_xml)"), NULL)))
|
||||
return -1;
|
||||
|
||||
if (virXMLInjectNamespace(doc->children, uri, key) < 0)
|
||||
|
@ -216,18 +216,6 @@ virXMLPickShellSafeComment(const char *str1,
|
||||
#define virXMLParse(filename, xmlStr, url, rootelement, ctxt, schemafile, validate) \
|
||||
virXMLParseHelper(VIR_FROM_THIS, filename, xmlStr, url, rootelement, ctxt, schemafile, validate)
|
||||
|
||||
/**
|
||||
* virXMLParseString:
|
||||
* @xmlStr: a string to parse
|
||||
* @url: an optional filename to attribute the parse to
|
||||
*
|
||||
* Parse xml from a string.
|
||||
*
|
||||
* Return the parsed document object, or NULL on failure.
|
||||
*/
|
||||
#define virXMLParseString(xmlStr, url) \
|
||||
virXMLParseHelper(VIR_FROM_THIS, NULL, xmlStr, url, NULL, NULL, NULL, false)
|
||||
|
||||
/**
|
||||
* virXMLParseFile:
|
||||
* @filename: file to parse
|
||||
|
Loading…
x
Reference in New Issue
Block a user