My Project
item_xmlfunc.h
00001 #ifndef ITEM_XMLFUNC_INCLUDED
00002 #define ITEM_XMLFUNC_INCLUDED
00003 
00004 /* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; version 2 of the License.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013    GNU General Public License for more details.
00014 
00015    You should have received a copy of the GNU General Public License
00016    along with this program; if not, write to the Free Software Foundation,
00017    51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
00018 
00019 
00020 /* This file defines all XML functions */
00021 
00022 class Item_xml_str_func: public Item_str_func
00023 {
00024 protected:
00025   String tmp_value, pxml;
00026   Item *nodeset_func;
00027 public:
00028   Item_xml_str_func(Item *a, Item *b): 
00029     Item_str_func(a,b) 
00030   {
00031     maybe_null= TRUE;
00032   }
00033   Item_xml_str_func(Item *a, Item *b, Item *c): 
00034     Item_str_func(a,b,c) 
00035   {
00036     maybe_null= TRUE;
00037   }
00038   void fix_length_and_dec();
00039   String *parse_xml(String *raw_xml, String *parsed_xml_buf);
00040 
00041 protected:
00051   void parse_xpath(Item* xpath_expr);
00052 };
00053 
00054 
00055 class Item_func_xml_extractvalue: public Item_xml_str_func
00056 {
00057 public:
00058   Item_func_xml_extractvalue(Item *a,Item *b) :Item_xml_str_func(a,b) {}
00059   const char *func_name() const { return "extractvalue"; }
00060   String *val_str(String *);
00061 };
00062 
00063 
00064 class Item_func_xml_update: public Item_xml_str_func
00065 {
00066   String tmp_value2, tmp_value3;
00067 public:
00068   Item_func_xml_update(Item *a,Item *b,Item *c) :Item_xml_str_func(a,b,c) {}
00069   const char *func_name() const { return "updatexml"; }
00070   String *val_str(String *);
00071 };
00072 
00073 #endif /* ITEM_XMLFUNC_INCLUDED */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines