mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
util: xml: Remove virXMLParseFile
Most callers prefer using the XPath context. Convert the last user to use virXMLParseFileCtxt and remove the helper macro. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
9b3828e263
commit
30095f4f4c
@ -216,17 +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)
|
||||
|
||||
/**
|
||||
* virXMLParseFile:
|
||||
* @filename: file to parse
|
||||
*
|
||||
* Parse xml from a file.
|
||||
*
|
||||
* Return the parsed document object, or NULL on failure.
|
||||
*/
|
||||
#define virXMLParseFile(filename) \
|
||||
virXMLParseHelper(VIR_FROM_THIS, filename, NULL, NULL, NULL, NULL, NULL, false)
|
||||
|
||||
/**
|
||||
* virXMLParseCtxt:
|
||||
* @filename: file to parse, or NULL for string parsing
|
||||
|
@ -51,7 +51,7 @@ testSchemaValidateXML(const void *args)
|
||||
bool shouldFail = virStringHasSuffix(data->xml_path, "-invalid.xml");
|
||||
g_autoptr(xmlDoc) xml = NULL;
|
||||
|
||||
if (!(xml = virXMLParseFile(data->xml_path)))
|
||||
if (!(xml = virXMLParseFileCtxt(data->xml_path, NULL)))
|
||||
return -1;
|
||||
|
||||
if ((virXMLValidatorValidate(data->validator, xml) < 0) != shouldFail)
|
||||
|
Loading…
Reference in New Issue
Block a user