<libroxml  version="2.3.0" />
contact: tristan.lelong@libroxml.net
roxml-types.h
Go to the documentation of this file.
1 
24 #ifndef ROXML_TYPES_H
25 #define ROXML_TYPES_H
26 
35 typedef int (*roxml_parse_func) (char *chunk, void *data);
36 
45 #if(CONFIG_XML_SMALL_INPUT_FILE==1)
46 typedef unsigned short roxml_pos_t;
47 #else /* CONFIG_XML_SMALL_INPUT_FILE==0 */
48 typedef unsigned int roxml_pos_t;
49 #endif /* CONFIG_XML_SMALL_INPUT_FILE */
50 
59 typedef struct memory_cell {
60  int type;
61  int occ;
62  void *ptr;
63  pthread_t id;
64  struct memory_cell *next;
65  struct memory_cell *prev;
67 
75 typedef struct _xpath_cond {
76  char rel;
77  char axes;
78  char op;
79  char op2;
80  char func;
81  char func2;
82  char *arg1;
83  char *arg2;
84  struct _xpath_node *xp;
85  struct _xpath_cond *next;
86 } xpath_cond_t;
87 
95 typedef struct _xpath_node {
96  char abs;
97  char rel;
98  char axes;
99  char *name;
100  struct _xpath_cond *xp_cond;
101  struct _xpath_cond *cond;
102  struct _xpath_node *next;
103 } xpath_node_t;
104 
112 typedef struct _xpath_tok_table {
113  unsigned char id;
114  unsigned char ids[256];
115  pthread_mutex_t mut;
116  struct _xpath_tok *next;
118 
126 typedef struct _xpath_tok {
127  unsigned char id;
128  struct _xpath_tok *next;
129 } xpath_tok_t;
130 
138 typedef struct _roxml_ns {
139  unsigned char id;
140  void *next;
141  char *alias;
142 } roxml_ns_t;
143 
152 typedef struct node {
153  unsigned short type;
154  union {
155  char *buf;
156  FILE *fil;
157  void *src;
158  } src;
161  struct node *sibl;
162  struct node *chld;
163  struct node *prnt;
164  struct node *attr;
165  struct node *next;
166  struct node *ns;
167  void *priv;
168 } node_t;
169 
177 typedef struct _roxml_load_ctx {
178  int pos;
180  int state;
182  int mode;
185  int type;
186  int nsdef;
187  int ns;
188  void *src;
196  char *curr_name;
198  int doctype;
200 
207 typedef struct _roxml_xpath_ctx {
208  int pos;
212  int nbpath;
213  int bracket;
215  int quoted;
216  int dquoted;
217  int context;
223 
230 typedef struct _roxml_parser_item {
231  int count;
232  int def_count;
233  char chunk;
235  struct _roxml_parser_item *next;
237 
238 #endif /* ROXML_TYPES_H */
struct _roxml_parser_item * next
Definition: roxml-types.h:235
roxml_parse_func func
Definition: roxml-types.h:234
char * buf
Definition: roxml-types.h:155
xpath_node_t * new_node
Definition: roxml-types.h:220
node_t structure
Definition: roxml-types.h:152
struct _xpath_cond * next
Definition: roxml-types.h:85
struct node * attr
Definition: roxml-types.h:164
node_t * last_ns
Definition: roxml-types.h:195
roxml_pos_t end
Definition: roxml-types.h:160
unsigned int roxml_pos_t
type for node indexes in raw tree
Definition: roxml-types.h:48
unsigned char id
Definition: roxml-types.h:139
xpath_node_t * first_node
Definition: roxml-types.h:219
int(* roxml_parse_func)(char *chunk, void *data)
parser callback functions
Definition: roxml-types.h:35
void * next
Definition: roxml-types.h:140
unsigned char id
Definition: roxml-types.h:113
struct node * chld
Definition: roxml-types.h:162
struct node * next
Definition: roxml-types.h:165
node_t * candidat_val
Definition: roxml-types.h:192
node_t * current_node
Definition: roxml-types.h:193
memory cell structure
Definition: roxml-types.h:59
node_t * candidat_txt
Definition: roxml-types.h:190
char * alias
Definition: roxml-types.h:141
struct _xpath_tok * next
Definition: roxml-types.h:128
char * arg2
Definition: roxml-types.h:83
node_t * candidat_arg
Definition: roxml-types.h:191
struct node * sibl
Definition: roxml-types.h:161
xpath token structure
Definition: roxml-types.h:126
char * arg1
Definition: roxml-types.h:82
pthread_mutex_t mut
Definition: roxml-types.h:115
struct _xpath_tok * next
Definition: roxml-types.h:116
void * src
Definition: roxml-types.h:157
xpath node structure
Definition: roxml-types.h:95
roxml_pos_t pos
Definition: roxml-types.h:159
struct node * ns
Definition: roxml-types.h:166
namespace structure
Definition: roxml-types.h:138
struct node node_t
node_t structure
Definition: roxml.h:50
xml parsing context
Definition: roxml-types.h:177
char * name
Definition: roxml-types.h:99
struct _xpath_cond * cond
Definition: roxml-types.h:101
struct memory_cell * prev
Definition: roxml-types.h:65
node_t * namespaces
Definition: roxml-types.h:194
the parser item struct
Definition: roxml-types.h:230
xpath parsing context
Definition: roxml-types.h:207
void * priv
Definition: roxml-types.h:167
struct node * prnt
Definition: roxml-types.h:163
struct _xpath_cond * xp_cond
Definition: roxml-types.h:100
xpath cond structure
Definition: roxml-types.h:75
struct memory_cell * next
Definition: roxml-types.h:64
FILE * fil
Definition: roxml-types.h:156
unsigned short type
Definition: roxml-types.h:153
unsigned char id
Definition: roxml-types.h:127
struct _xpath_node * next
Definition: roxml-types.h:102
pthread_t id
Definition: roxml-types.h:63
struct _xpath_node * xp
Definition: roxml-types.h:84
node_t * candidat_node
Definition: roxml-types.h:189
xpath_cond_t * new_cond
Definition: roxml-types.h:221
xpath token structure
Definition: roxml-types.h:112