33 #include "BESXMLUtils.h"
49 va_start( args, msg );
51 vsnprintf(mymsg,
sizeof mymsg, msg, args);
53 vector<string> *myerrors = (vector<string> *) context;
54 myerrors->push_back(mymsg);
72 if (node->properties == NULL) {
76 xmlAttr *curr_prop = node->properties;
78 string prop_name = (
char *) curr_prop->name;
81 xmlNode *curr_val = curr_prop->children;
82 if (curr_val && curr_val->content) {
86 props[prop_name] = prop_val;
88 curr_prop = curr_prop->next;
104 name = (
char *) node->name;
107 xmlNode *child_node = node->children;
109 while (child_node && !done) {
110 if (child_node->type == XML_TEXT_NODE) {
111 if (child_node->content) {
120 child_node = child_node->next;
135 xmlNode *child_node = NULL;
137 child_node = node->children;
139 while (child_node && !done) {
140 if (child_node->type == XML_ELEMENT_NODE) {
145 child_node = child_node->next;
163 child_node = child_node->next;
165 while (child_node && !done) {
166 if (child_node->type == XML_ELEMENT_NODE) {
171 child_node = child_node->next;
186 BESXMLUtils::GetChild(xmlNode *node,
const string &child_name,
string &child_value, map<string, string> &child_props)
188 xmlNode *child_node = NULL;
190 child_node = node->children;
192 while (child_node && !done) {
193 if (child_node->type == XML_ELEMENT_NODE) {
194 string name = (
char *) child_node->name;
196 if (name == child_name) {
201 child_node = child_node->next;
205 child_node = child_node->next;