Simple C Expat Wrapper (SCEW)  1.1.7
Files | Functions
Allocation

Allocate and free a parser. More...

Files

file  parser.h
 SCEW parser handling routines.
 

Functions

SCEW_API scew_parserscew_parser_create (void)
 Creates a new parser. More...
 
SCEW_API scew_parserscew_parser_namespace_create (XML_Char separator)
 Creates a new parser with namespaces support. More...
 
SCEW_API void scew_parser_free (scew_parser *parser)
 Frees a parser memory structure. More...
 

Detailed Description

Allocate and free a parser.

Function Documentation

SCEW_API scew_parser* scew_parser_create ( void  )

Creates a new parser.

A parser is necessary to load XML documents. Note that a parser might be re-used to load multiple XML documents, thus it is not necessary to create a parser for each XML document, but to call scew_parser_load.

Returns
a new parser, or NULL if parser is not successfully created.
SCEW_API scew_parser* scew_parser_namespace_create ( XML_Char  separator)

Creates a new parser with namespaces support.

Note that Expat expands the resulting elements and attributes, that is, they are formed by the namespace URI, the given namespace separator and the local part of the name.

Parameters
separatorthe character between namespace URI and identifier. If 0 is given, no separation is performed.
Returns
a new parser with namespace support, or NULL if parser is not successfully created.
SCEW_API void scew_parser_free ( scew_parser parser)

Frees a parser memory structure.

If a NULL parser is given, this function takes no action.