pacemaker  2.1.0-7c3f660
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
xpath.c File Reference
#include <crm_internal.h>
#include <stdio.h>
#include <string.h>
#include <crm/msg_xml.h>
#include <crm/common/xml_internal.h>
#include "crmcommon_private.h"
Include dependency graph for xpath.c:

Go to the source code of this file.

Functions

void freeXpathObject (xmlXPathObjectPtr xpathObj)
 
xmlNode * getXpathResult (xmlXPathObjectPtr xpathObj, int index)
 
void dedupXpathResults (xmlXPathObjectPtr xpathObj)
 
xmlXPathObjectPtr xpath_search (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 * get_xpath_object_relative (const char *xpath, xmlNode *xml_obj, int error_level)
 
xmlNode * get_xpath_object (const char *xpath, xmlNode *xml_obj, int error_level)
 
int pcmk__element_xpath (const char *prefix, xmlNode *xml, char *buffer, int offset, size_t buffer_size)
 
char * xml_get_path (xmlNode *xml)
 
char * pcmk__xpath_node_id (const char *xpath, const char *node)
 

Function Documentation

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.

Parameters
[in]xmlXML to search
[in]xpathXPath search string
[in]helperFunction to call for each result
[in,out]user_dataData to pass to supplied function
Note
The helper function will be passed the XML node of the result, and the supplied user_data. This function does not otherwise use user_data.

Definition at line 173 of file xpath.c.

void dedupXpathResults ( xmlXPathObjectPtr  xpathObj)

Definition at line 101 of file xpath.c.

void freeXpathObject ( xmlXPathObjectPtr  xpathObj)

Definition at line 39 of file xpath.c.

xmlNode* get_xpath_object ( const char *  xpath,
xmlNode *  xml_obj,
int  error_level 
)

Definition at line 214 of file xpath.c.

xmlNode* get_xpath_object_relative ( const char *  xpath,
xmlNode *  xml_obj,
int  error_level 
)

Definition at line 192 of file xpath.c.

xmlNode* getXpathResult ( xmlXPathObjectPtr  xpathObj,
int  index 
)

Definition at line 58 of file xpath.c.

int pcmk__element_xpath ( const char *  prefix,
xmlNode *  xml,
char *  buffer,
int  offset,
size_t  buffer_size 
)

Definition at line 269 of file xpath.c.

char* pcmk__xpath_node_id ( const char *  xpath,
const char *  node 
)

Definition at line 303 of file xpath.c.

char* xml_get_path ( xmlNode *  xml)

Definition at line 291 of file xpath.c.

xmlXPathObjectPtr xpath_search ( xmlNode *  xml_top,
const char *  path 
)

Definition at line 139 of file xpath.c.