21#include <libxml/parser.h>
22#include <libxml/tree.h>
23#include <libxml/xmlIO.h>
47 xmlNode *element = NULL;
49 if ((attr == NULL) || (attr->parent == NULL)) {
53 element = attr->parent;
57 crm_trace(
"ACLs prevent removal of attributes from %s element",
58 (
const char *) element->name);
62 if (!force && (element != NULL)
79 xmlNode *
parent = a->parent;
110 const char *
name = NULL;
111 const char *value = NULL;
112 gchar *value_esc = NULL;
115 if (attr == NULL || attr->children == NULL) {
119 nodepriv = attr->_private;
124 name = (
const char *) attr->name;
125 value = (
const char *) attr->children->content;
bool pcmk__check_acl(xmlNode *xml, const char *attr_name, enum pcmk__xml_flags mode)
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
#define pcmk__set_xml_flags(xml_priv, flags_to_set)
G_GNUC_INTERNAL void pcmk__xml_free_private_data(xmlNode *xml)
#define pcmk__clear_xml_flags(xml_priv, flags_to_clear)
G_GNUC_INTERNAL void pcmk__xml_set_parent_flags(xmlNode *xml, uint64_t flags)
G_GNUC_INTERNAL void G_GNUC_INTERNAL void pcmk__mark_xml_node_dirty(xmlNode *xml)
#define crm_trace(fmt, args...)
void pcmk__g_strcat(GString *buffer,...) G_GNUC_NULL_TERMINATED
uint32_t flags
Group of enum pcmk__xml_flags
Wrappers for and extensions to libxml2.
void pcmk__mark_xml_attr_dirty(xmlAttr *a)
int pcmk__xa_remove(xmlAttr *attr, bool force)
void pcmk__dump_xml_attr(const xmlAttr *attr, GString *buffer)
bool pcmk__marked_as_deleted(xmlAttrPtr a, void *user_data)
bool pcmk__xml_doc_all_flags_set(const xmlDoc *xml, uint32_t flags)
bool pcmk__xml_needs_escape(const char *text, enum pcmk__xml_escape_type type)
@ pcmk__xf_deleted
Node was deleted (set for attribute only)
@ pcmk__xf_modified
Node was modified.
@ pcmk__xf_acl_write
ACL write permission (implies read permission in most or all contexts)
@ pcmk__xf_tracking
Tracking is enabled (set for document only)
@ pcmk__xf_none
This flag has no effect.
char * pcmk__xml_escape(const char *text, enum pcmk__xml_escape_type type)