attribute.c File Reference

SCEW attribute type implementation. More...

#include "xattribute.h"
#include "xelement.h"
#include "util.h"
#include <string.h>

Functions

scew_attribute * scew_attribute_create (XML_Char const *name, XML_Char const *value)
void scew_attribute_free (scew_attribute *attribute)
unsigned int scew_attribute_count (scew_element const *element)
scew_attribute * scew_attribute_by_index (scew_element const *element, unsigned int idx)
scew_attribute * scew_attribute_by_name (scew_element const *element, XML_Char const *name)
XML_Char const * scew_attribute_name (scew_attribute const *attribute)
XML_Char const * scew_attribute_value (scew_attribute const *attribute)
XML_Char const * scew_attribute_set_name (scew_attribute *attribute, XML_Char const *name)
XML_Char const * scew_attribute_set_value (scew_attribute *attribute, XML_Char const *value)


Detailed Description

SCEW attribute type implementation.

Author:
Aleix Conchillo Flaque <aleix@member.fsf.org>
Date:
Mon Nov 25, 2002 00:41
Id
attribute.c 139 2003-05-17 13:58:36Z harald

Function Documentation

scew_attribute* scew_attribute_by_index scew_element const *  element,
unsigned int  idx
 

Returns the element attribute on the specified position. Positions are zero based.

Returns:
the attribute on the specified position, NULL if there is no attribute in the position.

scew_attribute* scew_attribute_by_name scew_element const *  element,
XML_Char const *  name
 

Returns the element attribute with the specified name. Remember that XML names are case-sensitive.

Returns:
the attribute with the given name, NULL if not found.

unsigned int scew_attribute_count scew_element const *  element  ) 
 

Returns the number of attributes of the specified element. An element can have zero or more attributes.

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

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

Returns:
the new created attribute.

void scew_attribute_free scew_attribute *  attribute  ) 
 

Frees an attribute memory structure. That is, its name and value. You should not call this function with an attribute coming from an element, but created with scew_attribute_create.

XML_Char const* scew_attribute_name scew_attribute const *  attribute  ) 
 

Returns the attribute name or NULL if the attribute does not exist.

XML_Char const* scew_attribute_set_name scew_attribute *  attribute,
XML_Char const *  name
 

Sets a new name to the given attribute and frees the old one.

Returns:
the new attribute name.

XML_Char const* scew_attribute_set_value scew_attribute *  attribute,
XML_Char const *  name
 

Sets a new value to the given attribute and frees the old one.

Returns:
the new attribute value.

XML_Char const* scew_attribute_value scew_attribute const *  attribute  ) 
 

Returns the attribute value or NULL if the attribute does not exist.


Generated on Mon Jun 5 10:20:48 2006 for Intelligence.kdevelop by  doxygen 1.4.6