Simple C Expat Wrapper (SCEW)  1.1.7
Files | Functions

Allocate and free attributes. More...


file  attribute.h
 SCEW attribute's handling routines.


SCEW_API scew_attributescew_attribute_create (XML_Char const *name, XML_Char const *value)
 Creates a new attribute with the given pair (name, value). More...
SCEW_API scew_attributescew_attribute_copy (scew_attribute const *attribute)
 Makes a copy of the given attribute. More...
SCEW_API void scew_attribute_free (scew_attribute *attribute)
 Frees the given attribute. More...

Detailed Description

Allocate and free attributes.

Function Documentation

SCEW_API scew_attribute* scew_attribute_create ( XML_Char const *  name,
XML_Char const *  value 

Creates a new attribute with the given pair (name, value).

name != NULL
value != NULL
the created attribute, or NULL if an error is found.
SCEW_API scew_attribute* scew_attribute_copy ( scew_attribute const *  attribute)

Makes a copy of the given attribute.

Note that the new copy does not belong to any element.

attribute != NULL
a new attribute, or NULL if the copy failed.
SCEW_API void scew_attribute_free ( scew_attribute attribute)

Frees the given attribute.

That is, its name and value. You should not call this function with an attribute obtained from an element, use scew_element_delete_attribute instead. If a NULL attribute is given, this function does not have any effect.