pacemaker
2.1.9-49aab99839
Scalable High-Availability cluster resource manager
|
Wrappers for and extensions to libxml2. More...
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include <libxml/tree.h>
#include <libxml/xpath.h>
#include <crm/crm.h>
#include <crm/common/nvpair.h>
#include <crm/common/schemas.h>
#include <crm/common/xml_io.h>
#include <crm/common/xml_names.h>
#include <crm/common/xml_compat.h>
Go to the source code of this file.
Typedefs | |
typedef const xmlChar * | pcmkXmlStr |
Functions | |
xmlNode * | get_xpath_object (const char *xpath, xmlNode *xml_obj, int error_level) |
char * | calculate_on_disk_digest (xmlNode *local_cib) |
Calculate and return digest of XML tree, suitable for storing on disk. More... | |
char * | calculate_operation_digest (xmlNode *local_cib, const char *version) |
Calculate and return digest of XML operation. More... | |
char * | calculate_xml_versioned_digest (xmlNode *input, gboolean sort, gboolean do_filter, const char *version) |
Calculate and return digest of XML tree. More... | |
void | crm_xml_init (void) |
Initialize the CRM XML subsystem. More... | |
void | crm_xml_cleanup (void) |
void | pcmk_free_xml_subtree (xmlNode *xml) |
void | free_xml (xmlNode *child) |
xmlNode * | sorted_xml (xmlNode *input, xmlNode *parent, gboolean recursive) |
xmlXPathObjectPtr | xpath_search (const xmlNode *xml_top, const char *path) |
void | crm_foreach_xpath_result (xmlNode *xml, const char *xpath, void(*helper)(xmlNode *, void *), void *user_data) |
Run a supplied function for each result of an xpath search. More... | |
xmlNode * | expand_idref (xmlNode *input, xmlNode *top) |
void | freeXpathObject (xmlXPathObjectPtr xpathObj) |
xmlNode * | getXpathResult (xmlXPathObjectPtr xpathObj, int index) |
void | dedupXpathResults (xmlXPathObjectPtr xpathObj) |
bool | xml_tracking_changes (xmlNode *xml) |
bool | xml_document_dirty (xmlNode *xml) |
void | xml_track_changes (xmlNode *xml, const char *user, xmlNode *acl_source, bool enforce_acls) |
void | xml_calculate_changes (xmlNode *old_xml, xmlNode *new_xml) |
void | xml_calculate_significant_changes (xmlNode *old_xml, xmlNode *new_xml) |
void | xml_accept_changes (xmlNode *xml) |
bool | xml_patch_versions (const xmlNode *patchset, int add[3], int del[3]) |
xmlNode * | xml_create_patchset (int format, xmlNode *source, xmlNode *target, bool *config, bool manage_version) |
int | xml_apply_patchset (xmlNode *xml, xmlNode *patchset, bool check_version) |
void | patchset_process_digest (xmlNode *patch, xmlNode *source, xmlNode *target, bool with_digest) |
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,...) G_GNUC_PRINTF(2 |
Wrappers for and extensions to libxml2.
Definition in file xml.h.
typedef const xmlChar* pcmkXmlStr |
char* calculate_on_disk_digest | ( | xmlNode * | input | ) |
char* calculate_operation_digest | ( | xmlNode * | input, |
const char * | version | ||
) |
char* calculate_xml_versioned_digest | ( | xmlNode * | input, |
gboolean | sort, | ||
gboolean | do_filter, | ||
const char * | version | ||
) |
Calculate and return digest of XML tree.
[in] | input | Root of XML to digest |
[in] | sort | Whether to sort XML before calculating digest |
[in] | do_filter | Whether to filter certain XML attributes |
[in] | version | CRM feature set version (used to select v1/v2 digest) |
void crm_foreach_xpath_result | ( | xmlNode * | xml, |
const char * | xpath, | ||
void(*)(xmlNode *, void *) | helper, | ||
void * | user_data | ||
) |
Run a supplied function for each result of an xpath search.
[in,out] | xml | XML to search |
[in] | xpath | XPath search string |
[in] | helper | Function to call for each result |
[in,out] | user_data | Data to pass to supplied function |
void crm_xml_init | ( | void | ) |
void crm_xml_sanitize_id | ( | char * | id | ) |
void crm_xml_set_id | ( | xmlNode * | xml, |
const char * | format, | ||
... | |||
) |
xmlNode* get_xpath_object | ( | const char * | xpath, |
xmlNode * | xml_obj, | ||
int | error_level | ||
) |
xmlNode* getXpathResult | ( | xmlXPathObjectPtr | xpathObj, |
int | index | ||
) |
void patchset_process_digest | ( | xmlNode * | patch, |
xmlNode * | source, | ||
xmlNode * | target, | ||
bool | with_digest | ||
) |
Definition at line 386 of file patchset.c.
void pcmk_free_xml_subtree | ( | xmlNode * | xml | ) |
xmlNode* sorted_xml | ( | xmlNode * | input, |
xmlNode * | parent, | ||
gboolean | recursive | ||
) |
int xml_apply_patchset | ( | xmlNode * | xml, |
xmlNode * | patchset, | ||
bool | check_version | ||
) |
Definition at line 1318 of file patchset.c.
void xml_calculate_changes | ( | xmlNode * | old_xml, |
xmlNode * | new_xml | ||
) |
void xml_calculate_significant_changes | ( | xmlNode * | old_xml, |
xmlNode * | new_xml | ||
) |
xmlNode* xml_create_patchset | ( | int | format, |
xmlNode * | source, | ||
xmlNode * | target, | ||
bool * | config, | ||
bool | manage_version | ||
) |
Definition at line 328 of file patchset.c.
bool xml_patch_versions | ( | const xmlNode * | patchset, |
int | add[3], | ||
int | del[3] | ||
) |
Definition at line 787 of file patchset.c.
void xml_track_changes | ( | xmlNode * | xml, |
const char * | user, | ||
xmlNode * | acl_source, | ||
bool | enforce_acls | ||
) |