Go to the documentation of this file.00001
00079 #ifndef ROXML_H
00080 #define ROXML_H
00081
00082 #include <stdio.h>
00083 #include <stdlib.h>
00084 #include <string.h>
00085 #include <pthread.h>
00086
00092 #define ROXML_API
00093
00094 #ifndef ROXML_INT
00095
00103 typedef struct node node_t;
00104 #endif
00105
00112 #define ROXML_ATTR_NODE 0x08
00113
00120 #define ROXML_STD_NODE 0x10
00121
00128 #define ROXML_TXT_NODE 0x20
00129
00136 #define ROXML_CMT_NODE 0x40
00137
00144 #define ROXML_PI_NODE 0x80
00145
00152 #define RELEASE_ALL (void*)-1
00153
00183 #define RELEASE_LAST (void*)-2
00184
00196 node_t* ROXML_API roxml_load_buf (char *buffer);
00197
00207 node_t* ROXML_API roxml_load_doc (char *filename);
00208
00220 void ROXML_API roxml_close (node_t *n);
00221
00229 node_t* ROXML_API roxml_get_parent (node_t *n);
00230
00272 node_t* ROXML_API roxml_get_chld (node_t *n, char * name, int nth);
00273
00281 int ROXML_API roxml_get_chld_nb (node_t *n);
00282
00296 char* ROXML_API roxml_get_name (node_t *n, char * buffer, int size);
00297
00312 char * ROXML_API roxml_get_content (node_t *n, char * buffer, int bufsize, int * size);
00313
00322 int ROXML_API roxml_get_attr_nb (node_t *n);
00323
00364 node_t* ROXML_API roxml_get_attr (node_t *n, char * name, int nth);
00365
00431 node_t ** ROXML_API roxml_xpath (node_t *n, char * path, int *nb_ans);
00432
00440 int ROXML_API roxml_get_type (node_t *n);
00441
00449 int ROXML_API roxml_get_node_position (node_t *n);
00450
00466 void ROXML_API roxml_release (void * data);
00467
00475 int roxml_get_type (node_t *n);
00476
00541 node_t * ROXML_API roxml_add_node (node_t * parent, int position, int type, char *name, char *value);
00542
00595 node_t * ROXML_API roxml_get_text (node_t *n, int nth);
00596
00606 int ROXML_API roxml_get_text_nb (node_t *n);
00607
00616 void ROXML_API roxml_del_node (node_t * n);
00617
00677 void ROXML_API roxml_commit_changes (node_t *n, char * dest, char ** buffer, int human);
00678
00679
00680 #endif
00681