#include "viralloc.h"
#include "virlog.h"
-#include <libxml/xpathInternals.h>
-
#define VIR_FROM_THIS VIR_FROM_BHYVE
VIR_LOG_INIT("bhyve.bhyve_domain");
size_t i;
int ret = -1;
- if (xmlXPathRegisterNs(ctxt, BAD_CAST "bhyve", BAD_CAST BHYVE_NAMESPACE_HREF) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to register xml namespace '%s'"),
- BHYVE_NAMESPACE_HREF);
- return -1;
- }
-
if (VIR_ALLOC(cmd) < 0)
return -1;
def->ns = xmlopt->ns;
if (def->ns.parse) {
+ if (virXMLNamespaceRegister(ctxt, &def->ns) < 0)
+ goto error;
if ((def->ns.parse)(ctxt, &def->namespaceData) < 0)
goto error;
}
#include "viralloc.h"
#include "virlog.h"
#include "virerror.h"
-#include <libxml/xpathInternals.h>
#include "virstring.h"
#include "virutil.h"
#include "virfile.h"
char *tmp = NULL;
size_t i;
- if (xmlXPathRegisterNs(ctxt, BAD_CAST "lxc", BAD_CAST LXC_NAMESPACE_HREF) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to register xml namespace '%s'"),
- LXC_NAMESPACE_HREF);
- return -1;
- }
-
if (VIR_ALLOC(lxcDef) < 0)
return -1;
# include <selinux/selinux.h>
#endif
-#include <libxml/xpathInternals.h>
#include "dosname.h"
#define QEMU_QXL_VGAMEM_DEFAULT 16 * 1024
qemuDomainXmlNsDefPtr nsdata = NULL;
int ret = -1;
- if (xmlXPathRegisterNs(ctxt, BAD_CAST "qemu", BAD_CAST QEMU_NAMESPACE_HREF) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to register xml namespace '%s'"),
- QEMU_NAMESPACE_HREF);
- return -1;
- }
-
if (VIR_ALLOC(nsdata) < 0)
return -1;
#include <unistd.h>
#include <sys/stat.h>
#include <libxml/xmlsave.h>
-#include <libxml/xpathInternals.h>
#include "virerror.h"
unsigned int tmpuint;
VIR_AUTOFREE(xmlNodePtr *) nodes = NULL;
- if (xmlXPathRegisterNs(ctxt, BAD_CAST "test",
- BAD_CAST TEST_NAMESPACE_HREF) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to register xml namespace '%s'"),
- TEST_NAMESPACE_HREF);
- return -1;
- }
-
if (VIR_ALLOC(nsdata) < 0)
return -1;