10#ifndef PCMK__CRM_COMMON_XML_COMPAT__H
11# define PCMK__CRM_COMMON_XML_COMPAT__H
14#include <libxml/tree.h>
31#define XML_PARANOIA_CHECKS 0
46void xml_log_changes(uint8_t level,
const char *function,
const xmlNode *xml);
49void xml_log_patchset(uint8_t level,
const char *function,
const xmlNode *xml);
52gboolean
apply_xml_diff(xmlNode *old_xml, xmlNode *diff, xmlNode **new_xml);
61static inline const char *
62crm_xml_add_boolean(xmlNode *node,
const char *
name, gboolean value)
68static inline const char *
69crm_element_name(
const xmlNode *xml)
71 return (xml == NULL)? NULL : (
const char *) xml->name;
const char * crm_xml_add(xmlNode *node, const char *name, const char *value)
Create an XML attribute with specified name and value.
Wrappers for and extensions to libxml2.
gboolean xml_has_children(const xmlNode *root)
int add_node_nocopy(xmlNode *parent, const char *name, xmlNode *child)
void xml_log_changes(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.
xmlDoc * getDocPtr(xmlNode *node)
gboolean apply_xml_diff(xmlNode *old_xml, xmlNode *diff, xmlNode **new_xml)
void crm_destroy_xml(gpointer data)
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)