22 if (fseek(node->
src.fil, pos, SEEK_SET) == 0)
23 ret_len = fread(buffer, 1, size, node->
src.fil);
30 fclose(root->
src.fil);
41 context->
src = (
void *)file;
49 int_len = fread(int_buffer + circle, 1,
ROXML_BULK_READ - circle, file) + circle;
50 int_buffer[int_len] =
'\0';
58 circle = int_len - ret;
59 if ((ret < 0) || (circle < 0)) {
63 memmove(int_buffer, int_buffer + ret, circle);
68 if (error == 0 && context->
lvl != 0)
69 ROXML_PARSE_ERROR(
"mismatch in open/close nodes");
76 node_t *current_node = NULL;
81 file = fdopen(fd,
"r");
92 node_t *current_node = NULL;
93 FILE *file = fopen(filename,
"rb");
#define ROXML_INVALID_DOC
ROXML_INT node_t * roxml_create_node(int pos, void *src, int type)
internal function
ROXML_INT node_t * roxml_load(node_t *current_node, FILE *file, char *buffer)
generic load function
ROXML_INT int roxml_parse_file(roxml_load_ctx_t *context, roxml_parser_item_t *parser, FILE *file)
generic load function
ROXML_INT int roxml_read_file(int pos, int size, char *buffer, node_t *node)
read xml doc function
ROXML_INT void roxml_close_file(node_t *root)
unload function
ROXML_API node_t * roxml_load_doc(char *filename)
load function for files
ROXML_API node_t * roxml_load_fd(int fd)
load function for file descriptors
internal header required by all libroxml sources
ROXML_INT int roxml_parse_line(roxml_parser_item_t *parser, char *line, int len, void *ctx)
line parsing function