parser.c File Reference

SCEW parser type implementation. More...

#include "parser.h"
#include "xparser.h"
#include "xhandler.h"
#include <stdio.h>
#include <string.h>

Functions

scew_parser * scew_parser_create ()
void scew_parser_free (scew_parser *parser)
unsigned int scew_parser_load_file (scew_parser *parser, char const *file_name)
unsigned int scew_parser_load_buffer (scew_parser *parser, unsigned char const *buffer, unsigned int size)
scew_tree * scew_parser_tree (scew_parser const *parser)
XML_Parser scew_parser_expat (scew_parser *parser)


Detailed Description

SCEW parser type implementation.

Author:
Aleix Conchillo Flaque <aleix@member.fsf.org>
Date:
Mon Nov 25, 2002 00:58
Id
parser.c 639 2004-02-23 13:26:43Z rene

Function Documentation

scew_parser* scew_parser_create  ) 
 

Creates a new parser which will be used to load XML trees.

XML_Parser scew_parser_expat scew_parser *  parser  ) 
 

Returns the internal Expat parser. Probably some low-level Expat functions need to be called. This function gives you access to the Expat parser so you will be able to call those functions. If you modify the Expat parser event handling routines, SCEW will not be able to load the XML tree.

void scew_parser_free scew_parser *  parser  ) 
 

Frees a parser memory structure. This function will not free the scew_tree generated by the parser, so it is important that you keep a pointer to it and remember to free it.

See also:
scew_tree_free

unsigned int scew_parser_load_buffer scew_parser *  parser,
unsigned char const *  buffer,
unsigned int  size
 

Loads an XML tree from the specified memory buffer of the specified size using the given parser.

Parameters:
parser the SCEW parser.
buffer memory buffer to load XML from.
size size in bytes of the memory buffer.
See also:
scew_parser_create

unsigned int scew_parser_load_file scew_parser *  parser,
char const *  file_name
 

Loads an XML tree from the specified file name using the given parser.

Parameters:
parser the SCEW parser.
file_name the file to load the XML from.
See also:
scew_parser_create

scew_tree* scew_parser_tree scew_parser const *  parser  ) 
 

Returns the XML tree read by the parser. Remember that scew_parser_free does not free the scew_tree read.

See also:
tree.h


Generated on Mon Jun 5 10:20:48 2006 for Intelligence.kdevelop by  doxygen 1.4.6