33 #include "BESXMLUtils.h"
53 va_start( args, msg );
55 vsnprintf(mymsg,
sizeof mymsg, msg, args);
57 vector<string> *myerrors = (vector<string> *) context;
58 myerrors->push_back(mymsg);
76 if (node->properties == NULL) {
80 xmlAttr *curr_prop = node->properties;
82 string prop_name = (
char *) curr_prop->name;
85 xmlNode *curr_val = curr_prop->children;
86 if (curr_val && curr_val->content) {
90 props[prop_name] = prop_val;
92 curr_prop = curr_prop->next;
108 name = (
char *) node->name;
111 xmlNode *child_node = node->children;
113 while (child_node && !done) {
114 if (child_node->type == XML_TEXT_NODE) {
115 if (child_node->content) {
124 child_node = child_node->next;
139 xmlNode *child_node = NULL;
141 child_node = node->children;
143 while (child_node && !done) {
144 if (child_node->type == XML_ELEMENT_NODE) {
149 child_node = child_node->next;
167 child_node = child_node->next;
169 while (child_node && !done) {
170 if (child_node->type == XML_ELEMENT_NODE) {
175 child_node = child_node->next;
190 BESXMLUtils::GetChild(xmlNode *node,
const string &child_name,
string &child_value, map<string, string> &child_props)
192 xmlNode *child_node = NULL;
194 child_node = node->children;
196 while (child_node && !done) {
197 if (child_node->type == XML_ELEMENT_NODE) {
198 string name = (
char *) child_node->name;
200 if (name == child_name) {
205 child_node = child_node->next;
209 child_node = child_node->next;