14 #include <libxml/tree.h> 114 for (
int lpc = 0; lpc <
PCMK__NELEM(cib_sections); lpc++) {
116 if (pcmk__str_eq(element_name, cib_sections[lpc].
name,
118 return cib_sections[lpc].path;
138 return ((xpath != NULL)? (xpath + 1) : NULL);
152 for (
int lpc = 0; lpc <
PCMK__NELEM(cib_sections); lpc++) {
154 if (pcmk__str_eq(element_name, cib_sections[lpc].
name,
156 return cib_sections[lpc].parent;
const char * pcmk_cib_xpath_for(const char *element_name)
Get the relative XPath needed to find a specified CIB element name.
#define XML_CIB_TAG_SECTION_ALL
#define XML_CIB_TAG_CONSTRAINTS
#define XML_TAG_FENCING_TOPOLOGY
const char * pcmk_cib_parent_name_for(const char *element_name)
Get the parent element name of a given CIB element name.
const char * pcmk__cib_abs_xpath_for(const char *element)
#define XML_CIB_TAG_NODES
xmlNode * get_xpath_object(const char *xpath, xmlNode *xml_obj, int error_level)
xmlNode * pcmk_find_cib_element(xmlNode *cib, const char *element_name)
Find an element in the CIB.
#define XML_CIB_TAG_RESOURCES
#define XML_CIB_TAG_CRMCONFIG
#define XML_CIB_TAG_RSCCONFIG
#define XML_CIB_TAG_STATUS
#define XML_CIB_TAG_ALERTS
#define XML_CIB_TAG_CONFIGURATION
#define XML_CIB_TAG_OPCONFIG