CPAINT :: Cross-Platform Asynchronous INterface Toolkit

Please note: CPAINT nor this website is under active development.

Backend: cpaint_node.set_attribute()

cpaint_node Method Summary

object add_node()
void set_data()
mixed get_data()
void set_id()
string get_id()
void set_attribute()
string get_attribute()
void set_name()
string get_name()

void set_attribute ( string attribute_name, mixed value )

Assigns a new value to an attribute of a node.

Class

cpaint_node

Parameters

» string namename of the attribute to assign a value to.
» mixed valuevalue to assign to this attribute. Please note that the value must be a scalar.

Return Value

» void

API Tags

» Access: public

Description

Assigns a value to an attribute of a node. If the attribute does not yet exist it will be created automatically.

Textdata will be properly escaped: All non-alphanumeric bytes except -_. will be replaced with a percent (%) sign followed by two hex digits representing their ASCII value.
Please note that UTF-8 is handled safely by this approach.

See RFC 1738 for details on this encoding.