Overview
Warnings
  • Strings returned by the XML Interface are only valid until control is returned to the framework OR until another XML Interface call is made, whichever is sooner. You should dereference and copy any such string immediately, and then not dereference it again.
C API (Component Interface)
Symbol xml_getAttribute(Symbol node, const char* name, const char** value);

Get the value of an attribute from an XML node.

Arguments

Symbol node
The XML node to operate on.
const char* name
The attribute name to get.
const char** value OUT
A pointer to the attribute value, or NULL if the attribute is not set on the node. Note that if the attribute is set, but empty, the empty string and C_OK will be returned.

Return Values

See also XML Interface Return Values.

  • C_OK, if the attribute is set.
  • E_NOT_FOUND, if the attribute is not set (value will be NULL).