Simple C Expat Wrapper (SCEW)  1.1.7
Files | Functions

Allocate and free XML trees. More...


file  tree.h
 SCEW tree handling routines.


SCEW_API scew_treescew_tree_create (void)
 Creates a new empty XML tree in memory. More...
SCEW_API scew_treescew_tree_copy (scew_tree const *tree)
 Makes a deep copy of the given tree. More...
SCEW_API void scew_tree_free (scew_tree *tree)
 Frees a tree memory structure. More...

Detailed Description

Allocate and free XML trees.

Function Documentation

SCEW_API scew_tree* scew_tree_create ( void  )

Creates a new empty XML tree in memory.

By default, the XML version is set to 1.0, and the encoding to UTF-8, also a standalone document is considered.

SCEW_API scew_tree* scew_tree_copy ( scew_tree const *  tree)

Makes a deep copy of the given tree.

A deep copy means that the root element and its children will be copied recursively. XML encoding, version and standalone attributes are also copied.

tree != NULL
treethe tree to be duplicated.
a new tree, or NULL if the copy failed.
SCEW_API void scew_tree_free ( scew_tree tree)

Frees a tree memory structure.

Call this function when you are done with your XML document. This will also free the root element recursively.

treethe tree to delete.