14 #include <libxml/tree.h> 35 node = xmlNewDocComment(doc, (
pcmkXmlStr) content);
50 pcmk__xc_match(
const xmlNode *root,
const xmlNode *search_comment,
bool exact)
52 xmlNode *a_child = NULL;
55 CRM_CHECK(search_comment->type == XML_COMMENT_NODE,
return NULL);
57 for (a_child = pcmk__xml_first_child(root); a_child != NULL;
58 a_child = pcmk__xml_next(a_child)) {
63 if (offset < search_offset) {
66 }
else if (offset > search_offset) {
75 if (a_child->type == XML_COMMENT_NODE
76 && pcmk__str_eq((
const char *)a_child->content, (
const char *)search_comment->content,
pcmk__str_casei)) {
102 CRM_CHECK(update->type == XML_COMMENT_NODE,
return);
111 }
else if (!pcmk__str_eq((
const char *)
target->content, (
const char *)update->content,
pcmk__str_casei)) {
113 target->content = xmlStrdup(update->content);
#define CRM_CHECK(expr, failure_action)
xmlNode * pcmk__xml_copy(xmlNode *parent, xmlNode *src)
G_GNUC_INTERNAL int pcmk__xml_position(const xmlNode *xml, enum xml_private_flags ignore_if_set)
G_GNUC_INTERNAL void pcmk__xml_new_private_data(xmlNode *xml)
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
const xmlChar * pcmkXmlStr
#define pcmk__assert(expr)
#define pcmk__mem_assert(ptr)