pacemaker
2.1.9-49aab99839
Scalable High-Availability cluster resource manager
|
#include <crm_internal.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <crm/crm.h>
#include <crm/common/xml.h>
#include <crm/common/xml_internal.h>
#include "crmcommon_private.h"
#include <crm/common/xml_compat.h>
Go to the source code of this file.
Macros | |
#define | XML_VERSION ((pcmkXmlStr) "1.0") |
libxml2 supports only XML version 1.0, at least as of libxml2-2.12.5 More... | |
#define | XPATH_MAX 512 |
Functions | |
bool | pcmk__xml_tree_foreach (xmlNode *xml, bool(*fn)(xmlNode *, void *), void *user_data) |
bool | pcmk__tracking_xml_changes (xmlNode *xml, bool lazy) |
void | pcmk__xml_set_parent_flags (xmlNode *xml, uint64_t flags) |
void | pcmk__set_xml_doc_flag (xmlNode *xml, enum xml_private_flags flag) |
void | pcmk__mark_xml_node_dirty (xmlNode *xml) |
void | pcmk__xml_new_private_data (xmlNode *xml) |
void | pcmk__xml_free_private_data (xmlNode *xml) |
void | xml_track_changes (xmlNode *xml, const char *user, xmlNode *acl_source, bool enforce_acls) |
bool | xml_tracking_changes (xmlNode *xml) |
bool | xml_document_dirty (xmlNode *xml) |
int | pcmk__xml_position (const xmlNode *xml, enum xml_private_flags ignore_if_set) |
xmlNode * | pcmk__xml_match (const xmlNode *haystack, const xmlNode *needle, bool exact) |
void | xml_accept_changes (xmlNode *xml) |
xmlNode * | pcmk__xe_first_child (const xmlNode *parent, const char *node_name, const char *attr_n, const char *attr_v) |
int | pcmk__xe_get_score (const xmlNode *xml, const char *name, int *score, int default_score) |
int | pcmk__xe_set_score (xmlNode *target, const char *name, const char *value) |
int | pcmk__xe_copy_attrs (xmlNode *target, const xmlNode *src, uint32_t flags) |
void | pcmk__xe_remove_attr (xmlNode *element, const char *name) |
bool | pcmk__xe_remove_attr_cb (xmlNode *xml, void *user_data) |
void | pcmk__xe_remove_matching_attrs (xmlNode *element, bool(*match)(xmlAttrPtr, void *), void *user_data) |
xmlNode * | pcmk__xe_create (xmlNode *parent, const char *name) |
xmlDoc * | pcmk__xml_new_doc (void) |
void | pcmk__xml_free_doc (xmlDoc *doc) |
void | pcmk__xe_set_content (xmlNode *node, const char *format,...) |
void | pcmk_free_xml_subtree (xmlNode *xml) |
void | free_xml (xmlNode *child) |
xmlNode * | pcmk__xml_copy (xmlNode *parent, xmlNode *src) |
void | pcmk__strip_xml_text (xmlNode *xml) |
const char * | pcmk__xe_add_last_written (xmlNode *xe) |
void | crm_xml_sanitize_id (char *id) |
Sanitize a string so it is usable as an XML ID. More... | |
void | crm_xml_set_id (xmlNode *xml, const char *format,...) |
Set the ID of an XML element using a format. More... | |
bool | pcmk__xml_needs_escape (const char *text, enum pcmk__xml_escape_type type) |
gchar * | pcmk__xml_escape (const char *text, enum pcmk__xml_escape_type type) |
void | xml_calculate_significant_changes (xmlNode *old_xml, xmlNode *new_xml) |
void | xml_calculate_changes (xmlNode *old_xml, xmlNode *new_xml) |
void | pcmk__xml_update (xmlNode *parent, xmlNode *target, xmlNode *update, uint32_t flags, bool as_diff) |
int | pcmk__xe_delete_match (xmlNode *xml, xmlNode *search) |
int | pcmk__xe_replace_match (xmlNode *xml, xmlNode *replace) |
int | pcmk__xe_update_match (xmlNode *xml, xmlNode *update, uint32_t flags) |
xmlNode * | sorted_xml (xmlNode *input, xmlNode *parent, gboolean recursive) |
xmlNode * | pcmk__xe_next_same (const xmlNode *node) |
void | crm_xml_init (void) |
Initialize the CRM XML subsystem. More... | |
void | crm_xml_cleanup (void) |
xmlNode * | expand_idref (xmlNode *input, xmlNode *top) |
char * | pcmk__xml_artefact_root (enum pcmk__xml_artefact_ns ns) |
char * | pcmk__xml_artefact_path (enum pcmk__xml_artefact_ns ns, const char *filespec) |
void | pcmk__xe_set_propv (xmlNodePtr node, va_list pairs) |
void | pcmk__xe_set_props (xmlNodePtr node,...) |
int | pcmk__xe_foreach_child (xmlNode *xml, const char *child_element_name, int(*handler)(xmlNode *xml, void *userdata), void *userdata) |
xmlNode * | find_entity (xmlNode *parent, const char *node_name, const char *id) |
void | crm_destroy_xml (gpointer data) |
xmlDoc * | getDocPtr (xmlNode *node) |
xmlNode * | add_node_copy (xmlNode *parent, xmlNode *src_node) |
int | add_node_nocopy (xmlNode *parent, const char *name, xmlNode *child) |
gboolean | xml_has_children (const xmlNode *xml_root) |
char * | crm_xml_escape (const char *text) |
xmlNode * | copy_xml (xmlNode *src) |
xmlNode * | create_xml_node (xmlNode *parent, const char *name) |
xmlNode * | pcmk_create_xml_text_node (xmlNode *parent, const char *name, const char *content) |
xmlNode * | pcmk_create_html_node (xmlNode *parent, const char *element_name, const char *id, const char *class_name, const char *text) |
xmlNode * | first_named_child (const xmlNode *parent, const char *name) |
xmlNode * | find_xml_node (const xmlNode *root, const char *search_path, gboolean must_find) |
xmlNode * | crm_next_same_xml (const xmlNode *sibling) |
void | xml_remove_prop (xmlNode *obj, const char *name) |
gboolean | replace_xml_child (xmlNode *parent, xmlNode *child, xmlNode *update, gboolean delete_only) |
gboolean | update_xml_child (xmlNode *child, xmlNode *to_update) |
int | find_xml_children (xmlNode **children, xmlNode *root, const char *tag, const char *field, const char *value, gboolean search_matches) |
void | fix_plus_plus_recursive (xmlNode *target) |
void | copy_in_properties (xmlNode *target, const xmlNode *src) |
void | expand_plus_plus (xmlNode *target, const char *name, const char *value) |
#define XML_VERSION ((pcmkXmlStr) "1.0") |
xmlNode* add_node_copy | ( | xmlNode * | new_parent, |
xmlNode * | xml_node | ||
) |
int add_node_nocopy | ( | xmlNode * | parent, |
const char * | name, | ||
xmlNode * | child | ||
) |
void copy_in_properties | ( | xmlNode * | target, |
const xmlNode * | src | ||
) |
xmlNode* copy_xml | ( | xmlNode * | src_node | ) |
xmlNode* create_xml_node | ( | xmlNode * | parent, |
const char * | name | ||
) |
void crm_destroy_xml | ( | gpointer | data | ) |
xmlNode* crm_next_same_xml | ( | const xmlNode * | sibling | ) |
char* crm_xml_escape | ( | const char * | text | ) |
void crm_xml_init | ( | void | ) |
void crm_xml_sanitize_id | ( | char * | id | ) |
void crm_xml_set_id | ( | xmlNode * | xml, |
const char * | format, | ||
... | |||
) |
void expand_plus_plus | ( | xmlNode * | target, |
const char * | name, | ||
const char * | value | ||
) |
xmlNode* find_entity | ( | xmlNode * | parent, |
const char * | node_name, | ||
const char * | id | ||
) |
int find_xml_children | ( | xmlNode ** | children, |
xmlNode * | root, | ||
const char * | tag, | ||
const char * | field, | ||
const char * | value, | ||
gboolean | search_matches | ||
) |
xmlNode* find_xml_node | ( | const xmlNode * | root, |
const char * | search_path, | ||
gboolean | must_find | ||
) |
xmlNode* first_named_child | ( | const xmlNode * | parent, |
const char * | name | ||
) |
void fix_plus_plus_recursive | ( | xmlNode * | target | ) |
xmlDoc* getDocPtr | ( | xmlNode * | node | ) |
void pcmk__set_xml_doc_flag | ( | xmlNode * | xml, |
enum xml_private_flags | flag | ||
) |
int pcmk__xe_copy_attrs | ( | xmlNode * | target, |
const xmlNode * | src, | ||
uint32_t | flags | ||
) |
xmlNode* pcmk__xe_create | ( | xmlNode * | parent, |
const char * | name | ||
) |
int pcmk__xe_delete_match | ( | xmlNode * | xml, |
xmlNode * | search | ||
) |
xmlNode* pcmk__xe_first_child | ( | const xmlNode * | parent, |
const char * | node_name, | ||
const char * | attr_n, | ||
const char * | attr_v | ||
) |
int pcmk__xe_foreach_child | ( | xmlNode * | xml, |
const char * | child_element_name, | ||
int(*)(xmlNode *xml, void *userdata) | handler, | ||
void * | userdata | ||
) |
int pcmk__xe_get_score | ( | const xmlNode * | xml, |
const char * | name, | ||
int * | score, | ||
int | default_score | ||
) |
void pcmk__xe_remove_attr | ( | xmlNode * | element, |
const char * | name | ||
) |
bool pcmk__xe_remove_attr_cb | ( | xmlNode * | xml, |
void * | user_data | ||
) |
void pcmk__xe_remove_matching_attrs | ( | xmlNode * | element, |
bool(*)(xmlAttrPtr, void *) | match, | ||
void * | user_data | ||
) |
int pcmk__xe_replace_match | ( | xmlNode * | xml, |
xmlNode * | replace | ||
) |
void pcmk__xe_set_content | ( | xmlNode * | node, |
const char * | format, | ||
... | |||
) |
int pcmk__xe_set_score | ( | xmlNode * | target, |
const char * | name, | ||
const char * | value | ||
) |
int pcmk__xe_update_match | ( | xmlNode * | xml, |
xmlNode * | update, | ||
uint32_t | flags | ||
) |
char* pcmk__xml_artefact_path | ( | enum pcmk__xml_artefact_ns | ns, |
const char * | filespec | ||
) |
char* pcmk__xml_artefact_root | ( | enum pcmk__xml_artefact_ns | ns | ) |
gchar* pcmk__xml_escape | ( | const char * | text, |
enum pcmk__xml_escape_type | type | ||
) |
xmlNode* pcmk__xml_match | ( | const xmlNode * | haystack, |
const xmlNode * | needle, | ||
bool | exact | ||
) |
bool pcmk__xml_needs_escape | ( | const char * | text, |
enum pcmk__xml_escape_type | type | ||
) |
int pcmk__xml_position | ( | const xmlNode * | xml, |
enum xml_private_flags | ignore_if_set | ||
) |
void pcmk__xml_set_parent_flags | ( | xmlNode * | xml, |
uint64_t | flags | ||
) |
bool pcmk__xml_tree_foreach | ( | xmlNode * | xml, |
bool(*)(xmlNode *, void *) | fn, | ||
void * | user_data | ||
) |
void pcmk__xml_update | ( | xmlNode * | parent, |
xmlNode * | target, | ||
xmlNode * | update, | ||
uint32_t | flags, | ||
bool | as_diff | ||
) |
xmlNode* pcmk_create_html_node | ( | xmlNode * | parent, |
const char * | element_name, | ||
const char * | id, | ||
const char * | class_name, | ||
const char * | text | ||
) |
xmlNode* pcmk_create_xml_text_node | ( | xmlNode * | parent, |
const char * | name, | ||
const char * | content | ||
) |
void pcmk_free_xml_subtree | ( | xmlNode * | xml | ) |
gboolean replace_xml_child | ( | xmlNode * | parent, |
xmlNode * | child, | ||
xmlNode * | update, | ||
gboolean | delete_only | ||
) |
xmlNode* sorted_xml | ( | xmlNode * | input, |
xmlNode * | parent, | ||
gboolean | recursive | ||
) |
gboolean update_xml_child | ( | xmlNode * | child, |
xmlNode * | to_update | ||
) |
void xml_calculate_changes | ( | xmlNode * | old_xml, |
xmlNode * | new_xml | ||
) |
void xml_calculate_significant_changes | ( | xmlNode * | old_xml, |
xmlNode * | new_xml | ||
) |
gboolean xml_has_children | ( | const xmlNode * | root | ) |
void xml_remove_prop | ( | xmlNode * | obj, |
const char * | name | ||
) |
void xml_track_changes | ( | xmlNode * | xml, |
const char * | user, | ||
xmlNode * | acl_source, | ||
bool | enforce_acls | ||
) |