#include "types.h"
#include <expat.h>
#include <stdio.h>
Go to the source code of this file.
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_file_fp (scew_parser *parser, FILE *in) |
unsigned int | scew_parser_load_buffer (scew_parser *parser, char const *buffer, unsigned int size) |
unsigned int | scew_parser_load_stream (scew_parser *parser, char const *buffer, unsigned int size) |
void | scew_parser_set_stream_callback (scew_parser *parser, SCEW_CALLBACK *cb) |
scew_tree * | scew_parser_tree (scew_parser const *parser) |
XML_Parser | scew_parser_expat (scew_parser *parser) |
void | scew_parser_ignore_whitespaces (scew_parser *parser, int ignore) |
These are the parser functions that allow to read an XML tree from a file or a memory buffer.
|
Creates a new parser. The parser is needed to load XML documents. |
|
Frees a parser memory structure. This function will not free the
|
|
Loads an XML tree from the specified file name using the given parser.
|
|
Loads an XML tree from the specified file pointer using the given parser.
|
|
Loads an XML tree from the specified memory buffer of the specified size using the given parser.
|
|
Loads an XML tree from the specified stream buffer. Will call the callback (set using scew_parser_set_stream_callback) at the end of each message.
|
|
Sets the callback for use when reading streams.
|
|
Returns the XML tree read by the parser. Remember that
|
|
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. |
|
Tells the parser how to treat white spaces. The default is to ignore heading and trailing white spaces. There is a new section in XML specification which talks about how to handle white spaces in XML. One can set an optional attribtue to an element, this attribute is called 'xml:space', and it can be set to 'default' or 'preserve', and it inherits its value from parent elements. 'preserve' means to leave white spaces as their are found, and 'default' means that white spaces are handled by the XML processor (Expat in our case) the way it wants to. This function gives the possibility to change the XML processor behaviour.
|