50 va_start( args, msg ) ;
52 vsprintf( mymsg, msg, args ) ;
53 vector<string> *myerrors = (vector<string> *)context ;
54 myerrors->push_back( mymsg ) ;
73 if( node->properties == NULL )
78 xmlAttr *curr_prop = node->properties ;
81 string prop_name = (
char *)curr_prop->name ;
84 xmlNode *curr_val = curr_prop->children ;
85 if( curr_val && curr_val->content )
90 props[prop_name] = prop_val ;
92 curr_prop = curr_prop->next ;
108 map<string, string> &props )
112 name = (
char *)node->name ;
115 xmlNode *child_node = node->children ;
117 while( child_node && !done )
119 if( child_node->type == XML_TEXT_NODE )
121 if( child_node->content )
132 child_node = child_node->next ;
148 map<string, string> &child_props )
150 xmlNode *child_node = NULL ;
153 child_node = node->children ;
155 while( child_node && !done )
157 if( child_node->type == XML_ELEMENT_NODE )
161 child_value, child_props ) ;
165 child_node = child_node->next ;
183 map<string, string> &next_props )
187 child_node = child_node->next ;
189 while( child_node && !done )
191 if( child_node->type == XML_ELEMENT_NODE )
195 next_value, next_props ) ;
199 child_node = child_node->next ;
215 const string &child_name,
217 map<string, string> &child_props )
219 xmlNode *child_node = NULL ;
222 child_node = node->children ;
224 while( child_node && !done )
226 if( child_node->type == XML_ELEMENT_NODE )
228 string name = (
char *)child_node->name ;
230 if( name == child_name )
234 child_value, child_props ) ;
238 child_node = child_node->next ;
243 child_node = child_node->next ;
static xmlNode * GetFirstChild(xmlNode *node, string &child_name, string &child_value, map< string, string > &child_props)
get the first element child node for the given node
static xmlNode * GetNextChild(xmlNode *child_node, string &next_name, string &next_value, map< string, string > &next_props)
get the next element child node after the given child node
static void GetNodeInfo(xmlNode *node, string &name, string &value, map< string, string > &props)
get the name, value if any, and any properties for the specified node
static void removeLeadingAndTrailingBlanks(string &key)
remove leading and trailing blanks from a string
static void XMLErrorFunc(void *context, const char *msg,...)
error function used by libxml2 to report errors
static void GetProps(xmlNode *node, map< string, string > &props)
given an xml node, build the map of properties for that node
static string xml2id(string in)
unescape xml escaped characters
static xmlNode * GetChild(xmlNode *node, const string &child_name, string &child_value, map< string, string > &child_props)
get the element child node of the given node with the given name