+ else if (mp::xml::is_element_mp(ptr, "charset"))
+ {
+ for (struct _xmlAttr *attr = ptr->properties;
+ attr; attr = attr->next)
+ {
+ if (!strcmp((const char *) attr->name, "from"))
+ {
+ charset_from = mp::xml::get_text(attr);
+ }
+ else if (!strcmp((const char *) attr->name, "to"))
+ {
+ charset_to = mp::xml::get_text(attr);
+ }
+ else
+ throw mp::filter::FilterException
+ ("Invalid attribute inside charset inside "
+ "query_rewrite filter");
+ }
+ }