mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 09:53:10 +00:00
util: introduce virXMLNodeNameEqual
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
a045317680
commit
5bd8a1c5d8
@ -2931,6 +2931,7 @@ virVHBAPathExists;
|
|||||||
virXMLCheckIllegalChars;
|
virXMLCheckIllegalChars;
|
||||||
virXMLChildElementCount;
|
virXMLChildElementCount;
|
||||||
virXMLExtractNamespaceXML;
|
virXMLExtractNamespaceXML;
|
||||||
|
virXMLNodeNameEqual;
|
||||||
virXMLNodeSanitizeNamespaces;
|
virXMLNodeSanitizeNamespaces;
|
||||||
virXMLNodeToString;
|
virXMLNodeToString;
|
||||||
virXMLParseHelper;
|
virXMLParseHelper;
|
||||||
|
@ -950,6 +950,22 @@ virXMLNodeToString(xmlDocPtr doc,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* virXMLNodeNameEqual:
|
||||||
|
* @node: xml Node pointer to check
|
||||||
|
* @name: name of the @node
|
||||||
|
*
|
||||||
|
* Compares the @node name with @name.
|
||||||
|
*/
|
||||||
|
bool
|
||||||
|
virXMLNodeNameEqual(xmlNodePtr node,
|
||||||
|
const char *name)
|
||||||
|
{
|
||||||
|
return xmlStrEqual(node->name, BAD_CAST name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
typedef int (*virXMLForeachCallback)(xmlNodePtr node,
|
typedef int (*virXMLForeachCallback)(xmlNodePtr node,
|
||||||
void *opaque);
|
void *opaque);
|
||||||
|
|
||||||
|
@ -168,6 +168,9 @@ int virXMLSaveFile(const char *path,
|
|||||||
|
|
||||||
char *virXMLNodeToString(xmlDocPtr doc, xmlNodePtr node);
|
char *virXMLNodeToString(xmlDocPtr doc, xmlNodePtr node);
|
||||||
|
|
||||||
|
bool virXMLNodeNameEqual(xmlNodePtr node,
|
||||||
|
const char *name);
|
||||||
|
|
||||||
xmlNodePtr virXMLFindChildNodeByNs(xmlNodePtr root,
|
xmlNodePtr virXMLFindChildNodeByNs(xmlNodePtr root,
|
||||||
const char *uri);
|
const char *uri);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user