Documentation de la bibliothèque MLV-3.1.0

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
45extern "C" {
46#endif
47
51typedef struct _MLV_Xml MLV_Xml;
52
62MLV_Xml* MLV_load_xml( const char* xml_file_path );
63
69void MLV_free_xml( MLV_Xml* xml_data );
70
82
119 const MLV_Xml* xml_data, char** result , const char* xpath, ...
120);
121
136 const MLV_Xml* xml_data, int* result, const char* xpath, ...
137);
138
153 const MLV_Xml* xml_data, double* result, const char* xpath, ...
154);
155
170 const MLV_Xml* xml_data, float* result, const char* xpath, ...
171);
172
173
186 const MLV_Xml* xml_data, const char* xpath, ...
187);
188
201MLV_Xml* MLV_get_xml_object_of( const MLV_Xml* xml_data, const char* xpath, ... );
202
211void MLV_print_xml( const MLV_Xml* xml_data );
212
213#ifdef __cplusplus
214}
215#endif
216
217#endif
MLV_Xml_error MLV_get_double_value_from_xml(const MLV_Xml *xml_data, double *result, const char *xpath,...)
Permet de récupérer le reel d'un champs donné du fichier xml.
MLV_Xml_error MLV_get_float_value_from_xml(const MLV_Xml *xml_data, float *result, const char *xpath,...)
Permet de récupérer le réel d'un champs donné du fichier xml.
MLV_Xml * MLV_load_xml(const char *xml_file_path)
Charge en mémoire un fichier au format xml.
void MLV_print_xml(const MLV_Xml *xml_data)
Écrit sur le terminal le contenu d'un fichier xml.
MLV_Xml_error MLV_get_integer_value_from_xml(const MLV_Xml *xml_data, int *result, const char *xpath,...)
Permet de récupérer l'entier d'un champs donné du fichier xml.
MLV_Xml * MLV_get_xml_object_of(const MLV_Xml *xml_data, const char *xpath,...)
Permet de récupérer un noeud interne de l'arbre représentant le fichier XML.
MLV_Xml_error
Énumère les différents codes d'erreurs que l'on peut rencontrer lorsque l'ordinateur lit un document ...
Definition MLV_xml.h:75
@ MLV_XML_THE_FIELD_IS_TOO_BIG
Definition MLV_xml.h:80
@ MLV_XML_NONE
Definition MLV_xml.h:76
@ MLV_XML_THE_FIELD_IS_NOT_A_REAL
Definition MLV_xml.h:78
@ MLV_XML_THE_FIELD_IS_NOT_AN_INTEGER
Definition MLV_xml.h:79
@ MLV_XML_THE_FIELD_DOESNT_EXIST
Definition MLV_xml.h:77
int MLV_get_number_of_objects_from_xml(const MLV_Xml *xml_data, const char *xpath,...)
Compte le nombre d'objets présents dans le fichier xml verifiant un certain nombre de critères passés...
void MLV_free_xml(MLV_Xml *xml_data)
Libère la mémoire utilisée par les données du fichier xml.
MLV_Xml_error MLV_get_string_value_from_xml(const MLV_Xml *xml_data, char **result, const char *xpath,...)
Permet d'accéder à l'interieur d'un champs donné du fichier xml.
struct _MLV_Xml MLV_Xml
Définit le type de donnée stockée au format xml dans la bibliothèque MLV.
Definition MLV_xml.h:51