Main Page | File List | File Members

tree.h File Reference

SCEW tree type declaration. More...

#include "types.h"
#include <expat.h>

Go to the source code of this file.

Functions

scew_treescew_tree_create ()
void scew_tree_free (scew_tree *tree)
scew_elementscew_tree_root (scew_tree const *tree)
scew_elementscew_tree_add_root (scew_tree *tree, XML_Char const *name)
void scew_tree_set_xml_version (scew_tree *tree, XML_Char const *version)
void scew_tree_set_xml_encoding (scew_tree *tree, XML_Char const *encoding)
void scew_tree_set_xml_preamble (scew_tree *tree, XML_Char const *preamble)
void scew_tree_set_xml_standalone (scew_tree *tree, int standalone)


Detailed Description

SCEW tree type declaration.

Author:
Aleix Conchillo Flaque <aleix@member.fsf.org>
Date:
Thu Feb 20, 2003 23:32
Id
tree.h,v 1.1 2004/01/28 00:43:21 aleix Exp

Tree related functions. SCEW provides functions to create new XML trees.


Function Documentation

scew_tree* scew_tree_create  ) 
 

Creates a new empty XML tree in memory. You can also have access to the tree created by the parser when reading an XML file.

See also:
parser.h

void scew_tree_free scew_tree tree  ) 
 

Frees a tree memory structure. Call this function when you are done with your XML. Do not call this function with a scew_tree obtained via a scew_parser, because scew_parser will delete it automatically when freed.

scew_element* scew_tree_root scew_tree const *  tree  ) 
 

Returns the root element of the given tree.

See also:
element.h

scew_element* scew_tree_add_root scew_tree tree,
XML_Char const *  name
 

Creates the first element (root) of an XML tree with the given name.

See also:
element.h

void scew_tree_set_xml_version scew_tree tree,
XML_Char const *  version
 

Sets the XML version in the XML declaration. Currently there is one XML version, so the value is always 1.0. If there were more XML versions, this proerty tells the XML processor which one to use.

void scew_tree_set_xml_encoding scew_tree tree,
XML_Char const *  encoding
 

Sets the character encoding used in the XML document. The default is UTF-8.

void scew_tree_set_xml_preamble scew_tree tree,
XML_Char const *  preamble
 

Sets the preamble string for the XML document. Typically this will contain a DOCTYPE declaration.

void scew_tree_set_xml_standalone scew_tree tree,
int  standalone
 

The standalone property tells the XML processor whether there are any other extra files to load, such as external entities or DTDs. If the XML document can stand on its own set it to 'yes'. The default SCEW value is 'no', so the XML processor will load what it needs to.

Parameters:
tree the tree to set the option to.
standalone 0 means 'no', any other value means 'yes'.


Generated on Tue May 25 23:38:29 2004 for Simple C Expat Wrapper by doxygen 1.3.7