![]()  | 
  
    <libroxml
    version="3.0.2"
   /> 
   | 
 
XML parsing core module. More...
#include <stdlib.h>#include <string.h>#include "roxml_core.h"#include "roxml_file.h"#include "roxml_buff.h"#include "roxml_parser.h"Go to the source code of this file.
Functions | |
| ROXML_API void | roxml_close (node_t *n) | 
| unload function   | |
| ROXML_INT node_t * | roxml_create_node (int pos, void *src, int type) | 
| internal function   | |
| ROXML_STATIC ROXML_INT void | roxml_close_node (node_t *n, node_t *close) | 
| internal function   | |
| ROXML_INT void | roxml_free_node (node_t *n) | 
| internal function   | |
| ROXML_INT void | roxml_del_tree (node_t *n) | 
| internal function   | |
| ROXML_INT int | roxml_is_separator (char sep) | 
| separator tester   | |
| ROXML_STATIC ROXML_INT void | roxml_process_unaliased_ns (roxml_load_ctx_t *context) | 
| namespace without alias name creation during parsing   | |
| ROXML_STATIC ROXML_INT void | roxml_process_begin_node (roxml_load_ctx_t *context, int position) | 
| node creation during parsing   | |
| ROXML_INT node_t * | roxml_load (node_t *current_node, FILE *file, char *buffer) | 
| generic load function   | |
| ROXML_INT node_t * | roxml_create_root (node_t *n) | 
| internal function   | |
| ROXML_STATIC ROXML_INT node_t * | roxml_lookup_nsdef (node_t *nsdef, char *ns) | 
| name space lookup in list   | |
| ROXML_STATIC ROXML_INT void | roxml_set_type (node_t *n, int type) | 
| node type setter function   | |
| ROXML_INT node_t * | roxml_set_parent (node_t *parent, node_t *n) | 
| node parenting function   | |
| ROXML_STATIC ROXML_INT node_t * | roxml_append_attr (node_t *parent, node_t *n) | 
| ROXML_STATIC ROXML_INT node_t * | roxml_append_other (node_t *parent, node_t *n) | 
| ROXML_INT node_t * | roxml_append_node (node_t *parent, node_t *n) | 
| node append function   | |
| ROXML_INT int | _func_load_quoted (roxml_parser_item_t *parser, char *chunk, void *data) | 
| ROXML_INT int | _func_load_dquoted (roxml_parser_item_t *parser, char *chunk, void *data) | 
| ROXML_INT int | _func_load_open_node (roxml_parser_item_t *parser, char *chunk, void *data) | 
| ROXML_INT int | _func_load_close_node (roxml_parser_item_t *parser, char *chunk, void *data) | 
| ROXML_INT int | _func_load_open_spec_node (roxml_parser_item_t *parser, char *chunk, void *data) | 
| ROXML_INT int | _func_load_close_comment (roxml_parser_item_t *parser, char *chunk, void *data) | 
| ROXML_INT int | _func_load_close_cdata (roxml_parser_item_t *parser, char *chunk, void *data) | 
| ROXML_INT int | _func_load_close_pi (roxml_parser_item_t *parser, char *chunk, void *data) | 
| ROXML_INT int | _func_load_end_node (roxml_parser_item_t *parser, char *chunk, void *data) | 
| ROXML_INT int | _func_load_white (roxml_parser_item_t *parser, char *chunk, void *data) | 
| ROXML_INT int | _func_load_colon (roxml_parser_item_t *parser, char *chunk, void *data) | 
| ROXML_INT int | _func_load_default (roxml_parser_item_t *parser, char *chunk, void *data) | 
XML parsing core module.
(C) Copyright 2014 Tristan Lelong trist.nosp@m.an.l.nosp@m.elong.nosp@m.@lib.nosp@m.roxml.nosp@m..net
SPDX-Licence-Identifier: LGPL-2.1+ The author added a static linking exception, see License.txt.
Definition in file roxml_core.c.
| ROXML_INT int _func_load_close_cdata | ( | roxml_parser_item_t * | parser, | 
| char * | chunk, | ||
| void * | data | ||
| ) | 
Definition at line 580 of file roxml_core.c.
| ROXML_INT int _func_load_close_comment | ( | roxml_parser_item_t * | parser, | 
| char * | chunk, | ||
| void * | data | ||
| ) | 
Definition at line 560 of file roxml_core.c.
| ROXML_INT int _func_load_close_node | ( | roxml_parser_item_t * | parser, | 
| char * | chunk, | ||
| void * | data | ||
| ) | 
Definition at line 426 of file roxml_core.c.
| ROXML_INT int _func_load_close_pi | ( | roxml_parser_item_t * | parser, | 
| char * | chunk, | ||
| void * | data | ||
| ) | 
Definition at line 601 of file roxml_core.c.
| ROXML_INT int _func_load_colon | ( | roxml_parser_item_t * | parser, | 
| char * | chunk, | ||
| void * | data | ||
| ) | 
Definition at line 717 of file roxml_core.c.
| ROXML_INT int _func_load_default | ( | roxml_parser_item_t * | parser, | 
| char * | chunk, | ||
| void * | data | ||
| ) | 
Definition at line 756 of file roxml_core.c.
| ROXML_INT int _func_load_dquoted | ( | roxml_parser_item_t * | parser, | 
| char * | chunk, | ||
| void * | data | ||
| ) | 
Definition at line 382 of file roxml_core.c.
| ROXML_INT int _func_load_end_node | ( | roxml_parser_item_t * | parser, | 
| char * | chunk, | ||
| void * | data | ||
| ) | 
Definition at line 629 of file roxml_core.c.
| ROXML_INT int _func_load_open_node | ( | roxml_parser_item_t * | parser, | 
| char * | chunk, | ||
| void * | data | ||
| ) | 
Definition at line 399 of file roxml_core.c.
| ROXML_INT int _func_load_open_spec_node | ( | roxml_parser_item_t * | parser, | 
| char * | chunk, | ||
| void * | data | ||
| ) | 
Definition at line 522 of file roxml_core.c.
| ROXML_INT int _func_load_quoted | ( | roxml_parser_item_t * | parser, | 
| char * | chunk, | ||
| void * | data | ||
| ) | 
Definition at line 365 of file roxml_core.c.
| ROXML_INT int _func_load_white | ( | roxml_parser_item_t * | parser, | 
| char * | chunk, | ||
| void * | data | ||
| ) | 
Definition at line 676 of file roxml_core.c.
Definition at line 327 of file roxml_core.c.
node append function
this function add a given node as the last child of another node
| parent | the parent node | 
| n | the node to parent | 
Definition at line 352 of file roxml_core.c.
Definition at line 341 of file roxml_core.c.
| void roxml_close | ( | node_t * | n | ) | 
unload function
This function clear a document and all the corresponding nodes It release all memory allocated during roxml_load_doc or roxml_load_file or roxml_add_node. All nodes from the tree are not available anymore.
| n | is any node of the tree to be cleaned | 
Definition at line 25 of file roxml_core.c.
internal function
This function close the node (add the end offset) and parent the node
| n | is the node to close | 
| close | is the node that close node n | 
Definition at line 65 of file roxml_core.c.
| node_t *ROXML_INT roxml_create_node | ( | int | pos, | 
| void * | src, | ||
| int | type | ||
| ) | 
internal function
This function allocate a new node
| pos | is the beginning offset of the node in the file | 
| src | is the pointer to the buffer or file | 
| type | is the type of node between arg and val | 
Definition at line 46 of file roxml_core.c.
internal function
This function initialize the root node with xpath table
| n | is the node to initialize | 
Definition at line 256 of file roxml_core.c.
| void ROXML_INT roxml_del_tree | ( | node_t * | n | ) | 
internal function
This function delete a tree recursively
| n | is one node of the tree | 
Definition at line 115 of file roxml_core.c.
| void ROXML_INT roxml_free_node | ( | node_t * | n | ) | 
internal function
This function delete a node without handling its tree
| n | is one node of the tree | 
Definition at line 82 of file roxml_core.c.
      
  | 
  inline | 
separator tester
This function tells if a char is a string separator
| sep | char to test | 
Definition at line 128 of file roxml_core.c.
generic load function
This function load a document and all the corresponding nodes file and buffer params are exclusive. You usualy want to load either a file OR a buffer
| current_node | the XML root | 
| file | file descriptor of document | 
| buffer | address of buffer that contains xml | 
Definition at line 201 of file roxml_core.c.
| roxml_lookup_nsdef | ( | node_t * | nsdef, | 
| char * | ns | ||
| ) | 
name space lookup in list
this function look for requested name space in nsdef list
| nsdef | the nsdef list | 
| ns | the namespace to find | 
Definition at line 278 of file roxml_core.c.
| roxml_process_begin_node | ( | roxml_load_ctx_t * | context, | 
| int | position | ||
| ) | 
node creation during parsing
this function create a new node upon finding new opening sign. It closes previous node if necessary
| context | the parsing context | 
| position | the position in the file | 
Definition at line 180 of file roxml_core.c.
| roxml_process_unaliased_ns | ( | roxml_load_ctx_t * | context | ) | 
namespace without alias name creation during parsing
this function create a new namespace without alias (default ns or remove ns)
| context | the parsing context | 
Definition at line 146 of file roxml_core.c.
node parenting function
this function updates a node to set its parent and namespace if necessary.
| parent | the parent node | 
| n | the node to parent | 
Definition at line 313 of file roxml_core.c.
      
  | 
  inline | 
node type setter function
this function change the type of a node
| n | the node to modify | 
| type | the new type to set | 
Definition at line 307 of file roxml_core.c.
 1.9.8