Remove the seldom used helper in favor of full virXMLParse.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
g_autoptr(xmlDoc) xml = NULL;
g_autoptr(xmlXPathContext) ctxt = NULL;
- if (!(xml = virXMLParseStringCtxtRoot(xmlStr, _("(disk_definition)"), "disk", &ctxt)))
+ if (!(xml = virXMLParse(NULL, xmlStr, _("(disk_definition)"),
+ "disk", &ctxt, NULL, false)))
return NULL;
return virDomainDiskDefParseXML(xmlopt, ctxt->node, ctxt, flags);
g_autoptr(virStorageSource) src = NULL;
xmlNodePtr driverNode;
- if (!(xml = virXMLParseStringCtxtRoot(xmlStr, _("(disk_definition)"), "disk", &ctxt)))
+ if (!(xml = virXMLParse(NULL, xmlStr, _("(disk_definition)"),
+ "disk", &ctxt, NULL, false)))
return NULL;
if (!(src = virDomainDiskDefParseSourceXML(xmlopt, ctxt->node, ctxt, flags)))
g_autoptr(xmlXPathContext) xpath_ctxt = NULL;
g_autoptr(virStoragePoolSource) def = NULL;
- if (!(doc = virXMLParseStringCtxtRoot(srcSpec,
- _("(storage_source_specification)"),
- "source",
- &xpath_ctxt)))
+ if (!(doc = virXMLParse(NULL, srcSpec, _("(storage_source_specification)"),
+ "source", &xpath_ctxt, NULL, false)))
return NULL;
def = g_new0(virStoragePoolSource, 1);
#define virXMLParseStringCtxt(xmlStr, url, pctxt) \
virXMLParseHelper(VIR_FROM_THIS, NULL, xmlStr, url, NULL, pctxt, NULL, false)
-/* virXMLParseStringCtxtRoot is same as above, except it also validates root node name */
-#define virXMLParseStringCtxtRoot(xmlStr, url, rootnode, pctxt) \
- virXMLParseHelper(VIR_FROM_THIS, NULL, xmlStr, url, rootnode, pctxt, NULL, false)
-
/**
* virXMLParseFileCtxt:
* @filename: file to parse