10 #ifndef PCMK__CRM_COMMON_XML__H 11 #define PCMK__CRM_COMMON_XML__H 15 #include <sys/types.h> 22 #include <libxml/tree.h> 23 #include <libxml/xpath.h> 49 xmlNode *
get_xpath_object(
const char *xpath, xmlNode * xml_obj,
int error_level);
53 void (*helper)(xmlNode*,
void*),
void *user_data);
59 static inline int numXpathResults(xmlXPathObjectPtr xpathObj)
61 if(xpathObj == NULL || xpathObj->nodesetval == NULL) {
64 return xpathObj->nodesetval->nodeNr;
69 void xml_track_changes(xmlNode * xml,
const char *user, xmlNode *acl_source,
bool enforce_acls);
76 int format, xmlNode *source, xmlNode *
target,
bool *config,
bool manage_version);
85 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
void xml_track_changes(xmlNode *xml, const char *user, xmlNode *acl_source, bool enforce_acls)
void xml_accept_changes(xmlNode *xml)
Wrappers for and extensions to XML input/output functions.
void dedupXpathResults(xmlXPathObjectPtr xpathObj)
xmlNode * get_xpath_object(const char *xpath, xmlNode *xml_obj, int error_level)
Deprecated Pacemaker XML API.
bool xml_tracking_changes(xmlNode *xml)
int xml_apply_patchset(xmlNode *xml, xmlNode *patchset, bool check_version)
bool xml_document_dirty(xmlNode *xml)
void patchset_process_digest(xmlNode *patch, xmlNode *source, xmlNode *target, bool with_digest)
const xmlChar * pcmkXmlStr
Functionality for manipulating name/value pairs.
xmlXPathObjectPtr xpath_search(const xmlNode *xml_top, const char *path)
Defined string constants for XML element and attribute names.
xmlNode * getXpathResult(xmlXPathObjectPtr xpathObj, int index)
void crm_foreach_xpath_result(xmlNode *xml, const char *xpath, void(*helper)(xmlNode *, void *), void *user_data)
Run a supplied function for each result of an xpath search.
bool xml_patch_versions(const xmlNode *patchset, int add[3], int del[3])
void xml_calculate_significant_changes(xmlNode *old_xml, xmlNode *new_xml)
void freeXpathObject(xmlXPathObjectPtr xpathObj)
xmlNode * xml_create_patchset(int format, xmlNode *source, xmlNode *target, bool *config, bool manage_version)
void xml_calculate_changes(xmlNode *old_xml, xmlNode *new_xml)