00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00039 #ifndef __MLV__MLV_XML_H__
00040 #define __MLV__MLV_XML_H__
00041
00042 #include <stdarg.h>
00043
00044 #ifdef __cplusplus
00045 extern "C" {
00046 #endif
00047
00051 typedef struct _MLV_Xml MLV_Xml;
00052
00062 MLV_Xml* MLV_load_xml( const char* xml_file_path );
00063
00069 void MLV_free_xml( MLV_Xml* xml_data );
00070
00075 typedef enum {
00076 MLV_XML_NONE,
00077 MLV_XML_THE_FIELD_DOESNT_EXIST,
00078 MLV_XML_THE_FIELD_IS_NOT_A_REAL,
00079 MLV_XML_THE_FIELD_IS_NOT_AN_INTEGER,
00080 MLV_XML_THE_FIELD_IS_TOO_BIG
00081 } MLV_Xml_error;
00082
00118 MLV_Xml_error MLV_get_string_value_from_xml(
00119 const MLV_Xml* xml_data, char** result , const char* xpath, ...
00120 );
00121
00134 MLV_Xml_error MLV_get_string_value_from_xml_va(
00135 const MLV_Xml* xml_data, char** result, const char* xpath, va_list pile
00136 );
00137
00138
00152 MLV_Xml_error MLV_get_integer_value_from_xml(
00153 const MLV_Xml* xml_data, int* result, const char* xpath, ...
00154 );
00155
00169 MLV_Xml_error MLV_get_double_value_from_xml(
00170 const MLV_Xml* xml_data, double* result, const char* xpath, ...
00171 );
00172
00186 MLV_Xml_error MLV_get_float_value_from_xml(
00187 const MLV_Xml* xml_data, float* result, const char* xpath, ...
00188 );
00189
00190
00202 int MLV_get_number_of_objects_from_xml(
00203 const MLV_Xml* xml_data, const char* xpath, ...
00204 );
00205
00218 MLV_Xml* MLV_get_xml_object_of( const MLV_Xml* xml_data, const char* xpath, ... );
00219
00228 void MLV_print_xml( const MLV_Xml* xml_data );
00229
00230 #ifdef __cplusplus
00231 }
00232 #endif
00233
00234 #endif