10 #ifndef PCMK__CRM_COMMON_XML_COMPAT__H 11 # define PCMK__CRM_COMMON_XML_COMPAT__H 14 #include <libxml/tree.h> 30 #define XML_PARANOIA_CHECKS 0 46 void xml_log_changes(uint8_t level,
const char *
function,
const xmlNode *xml);
49 void xml_log_patchset(uint8_t level,
const char *
function,
const xmlNode *xml);
52 gboolean
apply_xml_diff(xmlNode *old_xml, xmlNode *diff, xmlNode **new_xml);
61 static inline const char *
62 crm_xml_add_boolean(xmlNode *node,
const char *
name, gboolean value)
68 static inline const char *
69 crm_element_name(
const xmlNode *xml)
71 return (xml == NULL)? NULL : (
const char *) xml->name;
78 #endif // PCMK__CRM_COMMON_XML_COMPAT__H void xml_log_changes(uint8_t level, const char *function, const xmlNode *xml)
gboolean xml_has_children(const xmlNode *root)
const char * crm_xml_add(xmlNode *node, const char *name, const char *value)
Create an XML attribute with specified name and value.
void crm_destroy_xml(gpointer data)
xmlDoc * getDocPtr(xmlNode *node)
Wrappers for and extensions to libxml2.
gboolean apply_xml_diff(xmlNode *old_xml, xmlNode *diff, xmlNode **new_xml)
int add_node_nocopy(xmlNode *parent, const char *name, xmlNode *child)
xmlNode * find_entity(xmlNode *parent, const char *node_name, const char *id)
void xml_log_patchset(uint8_t level, const char *function, const xmlNode *xml)
char * xml_get_path(const xmlNode *xml)
Get an XPath string that matches an XML element as closely as possible.