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:
Peter Krempa 2022-09-23 14:44:25 +02:00
parent f1cd95cc28
commit 5d2f69aa68
2 changed files with 1 additions and 13 deletions

View File

@ -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)

View File

@ -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