# Documentation de la bibliothèque MLV-1.2.1

- Presentation
- Téléchargement
- Installation
- Compilation
- Exemples
- API
- Liste des fonctions
- bogues
- FAQ
- contacts

MLV_xml.h
Aller à la documentation de ce fichier.
1 /*
2 * This file is part of the MLV Library.
3 *
4 * Copyright (C) 2010,2011,2012 Adrien Boussicault, Marc Zipstein
5 *
6 *
7 * This Library is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This Library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this Library. If not, see <http://www.gnu.org/licenses/>.
19 */
20
39 #ifndef __MLV__MLV_XML_H__
40 #define __MLV__MLV_XML_H__
41
42 #include <stdarg.h>
43
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47
51 typedef struct _MLV_Xml MLV_Xml;
52
62 MLV_Xml* MLV_load_xml( const char* xml_file_path );
63
69 void MLV_free_xml( MLV_Xml* xml_data );
70
75 typedef enum {
76 MLV_XML_NONE,
77 MLV_XML_THE_FIELD_DOESNT_EXIST,
78 MLV_XML_THE_FIELD_IS_NOT_A_REAL,
79 MLV_XML_THE_FIELD_IS_NOT_AN_INTEGER,
80 MLV_XML_THE_FIELD_IS_TOO_BIG
81 } MLV_Xml_error;
82
118 MLV_Xml_error MLV_get_string_value_from_xml(
119 const MLV_Xml* xml_data, char** result , const char* xpath, ...
120 );
121
135 MLV_Xml_error MLV_get_integer_value_from_xml(
136 const MLV_Xml* xml_data, int* result, const char* xpath, ...
137 );
138
152 MLV_Xml_error MLV_get_double_value_from_xml(
153 const MLV_Xml* xml_data, double* result, const char* xpath, ...
154 );
155
169 MLV_Xml_error MLV_get_float_value_from_xml(
170 const MLV_Xml* xml_data, float* result, const char* xpath, ...
171 );
172
173
185 int MLV_get_number_of_objects_from_xml(
186 const MLV_Xml* xml_data, const char* xpath, ...
187 );
188
201 MLV_Xml* MLV_get_xml_object_of( const MLV_Xml* xml_data, const char* xpath, ... );
202
211 void MLV_print_xml( const MLV_Xml* xml_data );
212
213 #ifdef __cplusplus
214 }
215 #endif
216
217 #endif