home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 March (DVD) / PCWorld_2008-03_DVD.iso / komunikace / mysql / mysql-essential-5.0.45-win32.msi / product.cab / fili100 < prev    next >
Encoding:
Text File  |  2007-07-06  |  1.9 KB  |  67 lines

  1. /* Copyright (C) 2000 MySQL AB
  2.  
  3.    This program is free software; you can redistribute it and/or modify
  4.    it under the terms of the GNU General Public License as published by
  5.    the Free Software Foundation; version 2 of the License.
  6.  
  7.    This program is distributed in the hope that it will be useful,
  8.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  9.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10.    GNU General Public License for more details.
  11.  
  12.    You should have received a copy of the GNU General Public License
  13.    along with this program; if not, write to the Free Software
  14.    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  */
  15.  
  16.  
  17. #ifndef _my_xml_h
  18. #define _my_xml_h
  19.  
  20. #ifdef    __cplusplus
  21. extern "C" {
  22. #endif
  23.  
  24.  
  25. #define MY_XML_OK    0
  26. #define MY_XML_ERROR    1
  27.  
  28. typedef struct xml_stack_st
  29. {
  30.   char errstr[128];
  31.   char attr[128];
  32.   char *attrend;
  33.   const char *beg;
  34.   const char *cur;
  35.   const char *end;
  36.   void *user_data;
  37.   int  (*enter)(struct xml_stack_st *st,const char *val, uint len);
  38.   int  (*value)(struct xml_stack_st *st,const char *val, uint len);
  39.   int  (*leave_xml)(struct xml_stack_st *st,const char *val, uint len);
  40. } MY_XML_PARSER;
  41.  
  42. void my_xml_parser_create(MY_XML_PARSER *st);
  43. void my_xml_parser_free(MY_XML_PARSER *st);
  44. int  my_xml_parse(MY_XML_PARSER *st,const char *str, uint len);
  45.  
  46. void my_xml_set_value_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *,
  47.                              const char *,
  48.                              uint len));
  49. void my_xml_set_enter_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *,
  50.                              const char *,
  51.                              uint len));
  52. void my_xml_set_leave_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *,
  53.                              const char *,
  54.                              uint len));
  55. void my_xml_set_user_data(MY_XML_PARSER *st, void *);
  56.  
  57. uint my_xml_error_pos(MY_XML_PARSER *st);
  58. uint my_xml_error_lineno(MY_XML_PARSER *st);
  59.  
  60. const char *my_xml_error_string(MY_XML_PARSER *st);
  61.  
  62. #ifdef    __cplusplus
  63. }
  64. #endif
  65.  
  66. #endif /* _my_xml_h */
  67.