26 #ifndef GCU_XML_UTILS_H
27 #define GCU_XML_UTILS_H
29 #include <libxml/parser.h>
31 #include <goffice/goffice.h>
65 bool ReadPosition (xmlNodePtr node,
const char*
id,
double* x,
double* y,
double* z = NULL);
79 bool WritePosition (xmlDocPtr xml, xmlNodePtr node,
const char*
id,
double x,
double y,
double z = 0.0);
94 bool ReadColor (xmlNodePtr node,
const char*
id,
float* red,
float* green,
float* blue,
float* alpha = NULL);
109 bool WriteColor (xmlDocPtr xml, xmlNodePtr node,
const char*
id,
double red,
double green,
double blue,
double alpha = 1.0);
124 void WriteColor (xmlNodePtr node, GOColor color);
167 void WriteFloat (xmlNodePtr node,
char const *name,
double value);
179 bool ReadFloat (xmlNodePtr node,
char const *name,
double &value,
double default_value = 0.);
188 void WriteInt (xmlNodePtr node,
char const *name,
int value);
200 bool ReadInt (xmlNodePtr node,
char const *name,
int &value,
int default_value = 0);
210 void WriteDate (xmlNodePtr node,
char const *name, GDate
const *date);
222 bool ReadDate (xmlNodePtr node,
char const *name, GDate *date);
227 #endif // GCU_XML_UTILS_H