<libroxml  version="3.0.2" />
contact: tristan.lelong@libroxml.net
roxml_types.h
1 
12 #ifndef ROXML_TYPES_H
13 #define ROXML_TYPES_H
14 
15 #include <stdio.h>
16 #include <roxml_defines.h>
17 
26 #if(CONFIG_XML_SMALL_INPUT_FILE==1)
27 typedef unsigned short roxml_pos_t;
28 #else /* CONFIG_XML_SMALL_INPUT_FILE==0 */
29 typedef unsigned int roxml_pos_t;
30 #endif /* CONFIG_XML_SMALL_INPUT_FILE */
31 
40 typedef struct memory_cell {
41  int type;
42  int occ;
43  void *ptr;
44  unsigned long int id;
45  struct memory_cell *next;
46  struct memory_cell *prev;
48 
56 typedef struct _xpath_cond {
57  char rel;
58  char axes;
59  char op;
60  char op2;
61  char func;
62  char func2;
63  char *arg1;
64  char *arg2;
65  struct _xpath_node *xp;
66  struct _xpath_cond *next;
67 } xpath_cond_t;
68 
76 typedef struct _xpath_node {
77  char abs;
78  char rel;
79  char axes;
80  char *name;
81  struct _xpath_cond *xp_cond;
82  struct _xpath_cond *cond;
83  struct _xpath_node *next;
84 } xpath_node_t;
85 
93 typedef struct _xpath_tok_table {
94  unsigned char id;
95  unsigned char ids[256];
96  void *lock;
97  struct _xpath_tok *next;
99 
107 typedef struct _xpath_tok {
108  unsigned char id;
109  struct _xpath_tok *next;
110 } xpath_tok_t;
111 
119 typedef struct _roxml_ns {
120  unsigned char id;
121  void *next;
122  char *alias;
123 } roxml_ns_t;
124 
133 typedef struct node {
134  unsigned short type;
135  union {
136  char *buf;
137  FILE *fil;
138  void *src;
139  } src;
140  roxml_pos_t pos;
141  roxml_pos_t end;
142  struct node *sibl;
143  struct node *chld;
144  struct node *prnt;
145  struct node *attr;
146  struct node *next;
147  struct node *ns;
148  void *priv;
149 } node_t;
150 
158 typedef struct _roxml_load_ctx {
159  int pos;
160  int lvl;
162  int state;
164  int mode;
167  int type;
168  int nsdef;
169  int ns;
170  void *src;
178  char curr_name[MAX_NAME_LEN+1];
180  int doctype;
182 
189 typedef struct _roxml_xpath_ctx {
190  int pos;
194  int nbpath;
195  int bracket;
197  int quoted;
198  int dquoted;
199  int context;
205 
215 typedef int (*roxml_parse_func) (roxml_parser_item_t *parser, char *chunk, void *data);
216 
224  roxml_parse_func func;
226 };
227 
228 #endif /* ROXML_TYPES_H */
struct _roxml_parser_item * next
Definition: roxml_types.h:225
char * buf
Definition: roxml_types.h:136
xpath_node_t * new_node
Definition: roxml_types.h:202
unsigned long int id
Definition: roxml_types.h:44
node_t structure
Definition: roxml_types.h:133
struct _xpath_cond * next
Definition: roxml_types.h:66
struct node * attr
Definition: roxml_types.h:145
node_t * last_ns
Definition: roxml_types.h:177
roxml_pos_t end
Definition: roxml_types.h:141
unsigned char id
Definition: roxml_types.h:120
xpath_node_t * first_node
Definition: roxml_types.h:201
void * next
Definition: roxml_types.h:121
unsigned char id
Definition: roxml_types.h:94
struct node * chld
Definition: roxml_types.h:143
struct node * next
Definition: roxml_types.h:146
node_t * candidat_val
Definition: roxml_types.h:174
node_t * current_node
Definition: roxml_types.h:175
memory cell structure
Definition: roxml_types.h:40
node_t * candidat_txt
Definition: roxml_types.h:172
char * alias
Definition: roxml_types.h:122
struct _xpath_tok * next
Definition: roxml_types.h:109
char * arg2
Definition: roxml_types.h:64
node_t * candidat_arg
Definition: roxml_types.h:173
struct node * sibl
Definition: roxml_types.h:142
xpath token structure
Definition: roxml_types.h:107
char * arg1
Definition: roxml_types.h:63
struct _xpath_tok * next
Definition: roxml_types.h:97
void * src
Definition: roxml_types.h:138
xpath node structure
Definition: roxml_types.h:76
roxml_pos_t pos
Definition: roxml_types.h:140
struct node * ns
Definition: roxml_types.h:147
namespace structure
Definition: roxml_types.h:119
struct node node_t
node_t structure
Definition: roxml.h:35
xml parsing context
Definition: roxml_types.h:158
char * name
Definition: roxml_types.h:80
struct _xpath_cond * cond
Definition: roxml_types.h:82
struct memory_cell * prev
Definition: roxml_types.h:46
node_t * namespaces
Definition: roxml_types.h:176
the parser item struct
Defines used trhoughout the sources.
xpath parsing context
Definition: roxml_types.h:189
void * priv
Definition: roxml_types.h:148
struct node * prnt
Definition: roxml_types.h:144
struct _xpath_cond * xp_cond
Definition: roxml_types.h:81
xpath cond structure
Definition: roxml_types.h:56
struct memory_cell * next
Definition: roxml_types.h:45
FILE * fil
Definition: roxml_types.h:137
unsigned short type
Definition: roxml_types.h:134
roxml_parse_func func
Definition: roxml_types.h:224
unsigned char id
Definition: roxml_types.h:108
struct _xpath_node * next
Definition: roxml_types.h:83
struct _xpath_node * xp
Definition: roxml_types.h:65
node_t * candidat_node
Definition: roxml_types.h:171
xpath_cond_t * new_cond
Definition: roxml_types.h:203
#define MAX_NAME_LEN
Definition: roxml_defines.h:66
xpath token structure
Definition: roxml_types.h:93