<libroxml  version="3.0.2" />
contact: tristan.lelong@libroxml.net
roxml_parser.h File Reference

Parsing engine. More...

#include "roxml_internal.h"

Go to the source code of this file.


ROXML_INT roxml_parser_item_troxml_append_parser_item (roxml_parser_item_t *parser, char *key, roxml_parse_func func)
 parser item creation function More...
ROXML_INT roxml_parser_item_troxml_parser_allocate (void)
 parser table allocation More...
ROXML_INT void roxml_parser_free (roxml_parser_item_t *parser)
 parser table deletion More...
ROXML_INT roxml_parser_item_troxml_parser_prepare (roxml_parser_item_t *parser)
 parser preparation function More...
ROXML_INT ROXML_PARSE int roxml_parse_line (roxml_parser_item_t *parser, char *line, int len, void *ctx)
 line parsing function More...

Detailed Description

Parsing engine.

(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_parser.h.

Function Documentation

◆ roxml_append_parser_item()

ROXML_INT roxml_parser_item_t* roxml_append_parser_item ( roxml_parser_item_t parser,
char *  key,
roxml_parse_func  func 

parser item creation function

this function create a new parser item and append it to the parser list.

parserthe parser parser list or NULL for first item
keythe char to trigger callback for
functhe function to call on match
the parser item

Definition at line 41 of file roxml_parser.c.

◆ roxml_parse_line()

ROXML_INT ROXML_PARSE int roxml_parse_line ( roxml_parser_item_t parser,
char *  line,
int  len,
void *  ctx 

line parsing function

this function parse a line : it calls parsing functions when key matches

parserthe parser object
linethe string to parse
lenthe len of string or 0 if auto calculate len (using \0)
ctxuser data passed to the callbacks
the number of bytes processed

Definition at line 149 of file roxml_parser.c.

◆ roxml_parser_allocate()

ROXML_INT roxml_parser_item_t* roxml_parser_allocate ( void  )

parser table allocation

this function allocate an empty parser object

the allocated parser

Definition at line 88 of file roxml_parser.c.

◆ roxml_parser_free()

ROXML_INT void roxml_parser_free ( roxml_parser_item_t parser)

parser table deletion

this function delete a prepared parser object

parserthe parser object

Definition at line 100 of file roxml_parser.c.

◆ roxml_parser_prepare()

ROXML_INT roxml_parser_item_t* roxml_parser_prepare ( roxml_parser_item_t parser)

parser preparation function

this function compile a parser list into a table and calculate count variables for parsing optim

parserthe parser object

Definition at line 105 of file roxml_parser.c.