mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +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;
|
||||
virXMLChildElementCount;
|
||||
virXMLExtractNamespaceXML;
|
||||
virXMLNodeNameEqual;
|
||||
virXMLNodeSanitizeNamespaces;
|
||||
virXMLNodeToString;
|
||||
virXMLParseHelper;
|
||||
|
@ -950,6 +950,22 @@ virXMLNodeToString(xmlDocPtr doc,
|
||||
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,
|
||||
void *opaque);
|
||||
|
||||
|
@ -168,6 +168,9 @@ int virXMLSaveFile(const char *path,
|
||||
|
||||
char *virXMLNodeToString(xmlDocPtr doc, xmlNodePtr node);
|
||||
|
||||
bool virXMLNodeNameEqual(xmlNodePtr node,
|
||||
const char *name);
|
||||
|
||||
xmlNodePtr virXMLFindChildNodeByNs(xmlNodePtr root,
|
||||
const char *uri);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user