<libroxml  version="2.2.1" />
contact: tristan.lelong@libroxml.net
roxml.h
Go to the documentation of this file.
1 
26 #ifndef ROXML_H
27 #define ROXML_H
28 
29 #include <stdio.h>
30 #include <stdlib.h>
31 #include <string.h>
32 
33 #ifdef _WIN32
34 #include "roxml_win32_native.h"
35 #else
36 #include <pthread.h>
37 #endif
38 
44 #define ROXML_API
45 
46 #ifndef ROXML_INT
47 
55 typedef struct node node_t;
56 #endif
57 
64 #define ROXML_ATTR_NODE 0x008
65 
75 #define ROXML_STD_NODE 0x010
76 
83 #define ROXML_ELM_NODE 0x010
84 
91 #define ROXML_TXT_NODE 0x020
92 
99 #define ROXML_CMT_NODE 0x040
100 
107 #define ROXML_PI_NODE 0x080
108 
115 #define ROXML_NS_NODE 0x100
116 
123 #define ROXML_NSDEF_NODE (ROXML_NS_NODE | ROXML_ATTR_NODE)
124 
131 #define ROXML_CDATA_NODE (ROXML_TXT_NODE | 0x200)
132 
139 #define ROXML_DOCTYPE_NODE 0x400
140 
147 #define ROXML_ALL_NODE (ROXML_PI_NODE | ROXML_CMT_NODE | ROXML_TXT_NODE | ROXML_ATTR_NODE | ROXML_ELM_NODE)
148 
155 #define ROXML_NODE_TYPES 0x05f8
156 
163 #define RELEASE_ALL (void*)-1
164 
193 #define RELEASE_LAST (void*)-2
194 
207 node_t* ROXML_API roxml_load_buf (char *buffer);
208 
220 node_t* ROXML_API roxml_load_doc (char *filename);
221 
232 node_t* ROXML_API roxml_load_fd (int fd);
233 
246 void ROXML_API roxml_close (node_t *n);
247 
256 
265 
274 
318 
372 
391 
440 node_t* ROXML_API roxml_get_cmt (node_t *n, int nth);
441 
452 
494 node_t* ROXML_API roxml_get_chld (node_t *n, char * name, int nth);
495 
504 
553 node_t* ROXML_API roxml_get_pi (node_t *n, int nth);
554 
565 
588 char* ROXML_API roxml_get_name (node_t *n, char * buffer, int size);
589 
614 char * ROXML_API roxml_get_content (node_t *n, char * buffer, int bufsize, int * size);
615 
677 int ROXML_API roxml_get_nodes_nb (node_t *n, int type);
678 
698 node_t* ROXML_API roxml_get_nodes (node_t *n, int type, char * name, int nth);
699 
709 
750 node_t* ROXML_API roxml_get_attr (node_t *n, char * name, int nth);
751 
764 node_t ** ROXML_API roxml_xpath (node_t *n, char * path, int *nb_ans);
765 
775 
784 
800 void ROXML_API roxml_release (void * data);
801 
904 node_t * ROXML_API roxml_add_node (node_t * parent, int position, int type, char *name, char *value);
905 
959 node_t * ROXML_API roxml_get_txt (node_t * n, int nth);
960 
971 
985 void ROXML_API roxml_del_node (node_t * n);
986 
1081 int ROXML_API roxml_commit_changes (node_t *n, char * dest, char ** buffer, int human);
1082 
1083 
1084 #endif /* ROXML_H */
1085