![]() |
SqueezeBrains SDK 1.18
|
Definitions of functions to manage your own custom parameters. More...

Functions | |
| SB_HANDLE | sb_xml_node_get (SB_HANDLE parent, const char *const name) |
| Gets the handle of the xml node with the specified name. More... | |
| SB_HANDLE | sb_xml_node_get_child (SB_HANDLE parent) |
| Gets the first child of the node. More... | |
| SB_HANDLE | sb_xml_node_previous (SB_HANDLE node) |
| Gets the previous sibling node. More... | |
| SB_HANDLE | sb_xml_node_next (SB_HANDLE node) |
| Gets the next sibling node. More... | |
| SB_HANDLE | sb_xml_node_add (SB_HANDLE parent, const char *const name, const char *const content) |
| Adds the node to the parent node. More... | |
| sb_t_err | sb_xml_node_set (SB_HANDLE parent, const char *const name, const char *const content) |
| Sets the content of the node with the specified name. The function checks if the node exists and otherwise creates it. If the node exists, the value is updated. More... | |
| sb_t_err | sb_xml_node_get_name (SB_HANDLE node, char *const str, size_t str_size) |
| Gets the name of the current node. More... | |
| sb_t_err | sb_xml_node_set_attribute (SB_HANDLE node, const char *const attribute_name, const char *const content) |
| Sets the content of the attribute with the specified name. More... | |
| sb_t_err | sb_xml_node_get_attribute (SB_HANDLE node, const char *const attribute_name, char *const str, size_t str_size) |
| Gets the content of the attribute with the specified name. More... | |
| sb_t_err | sb_xml_node_set_itself (SB_HANDLE node, const char *const content) |
| Sets the content of the node. More... | |
| sb_t_err | sb_xml_node_count (SB_HANDLE parent, const char *const name, int *const cnt) |
| Gets the number of child nodes with the specified name. More... | |
| sb_t_err | sb_xml_node_get_string (SB_HANDLE parent, const char *const name, char *const str, size_t str_size) |
| Gets the content of the node with the specified name. More... | |
| sb_t_err | sb_xml_node_get_string_malloc (SB_HANDLE parent, const char *const name, char **const str) |
| Gets the content of the node with the specified name, allocating the string of the needed length. More... | |
| sb_t_err | sb_xml_node_remove (SB_HANDLE parent, const char *const name) |
| Removes the node with the specified name. More... | |
| sb_t_err | sb_xml_node_remove_itself (SB_HANDLE node) |
| Removes the current node. More... | |
Definitions of functions to manage your own custom parameters.
See Manage custom parameters for more information.
Adds the node to the parent node.
| [in] | parent | Pointer to the parent node |
| [in] | name | Name of the node to be added. The string must be compliant to UTF-8 format. |
| [in] | content | Content of the node to be added. The string must be compliant to UTF-8 format. If NULL a node without text will be added, i.e. a node containing other nodes. |
Gets the number of child nodes with the specified name.
| [in] | parent | Pointer to the parent node |
| [in] | name | Name of the nodes to count |
| [out] | cnt | Count of the child nodes with the specified name |
Gets the handle of the xml node with the specified name.
| [in] | parent | Pointer to the parent node |
| [in] | name | Name of the xml node to look for |
| sb_t_err sb_xml_node_get_attribute | ( | SB_HANDLE | node, |
| const char *const | attribute_name, | ||
| char *const | str, | ||
| size_t | str_size | ||
| ) |
Gets the content of the attribute with the specified name.
| [in] | node | Pointer to the current node |
| [in] | attribute_name | Name of the attribute to get |
| [out] | str | String of the content of the attribute to get |
| [in] | str_size | Max length of the string |
Gets the first child of the node.
| [in] | parent | Pointer to the parent node |
Gets the name of the current node.
| [in] | node | Pointer to the current node |
| [out] | str | String of the name |
| [in] | str_size | Max length of the string |
| sb_t_err sb_xml_node_get_string | ( | SB_HANDLE | parent, |
| const char *const | name, | ||
| char *const | str, | ||
| size_t | str_size | ||
| ) |
Gets the content of the node with the specified name.
| [in] | parent | Pointer to the parent node |
| [in] | name | Name of the node to look for. If NULL the function considers the parent as the current node. |
| [out] | str | String of the content of the node |
| [in] | str_size | Max length of the string of the content of the node |
| sb_t_err sb_xml_node_get_string_malloc | ( | SB_HANDLE | parent, |
| const char *const | name, | ||
| char **const | str | ||
| ) |
Gets the content of the node with the specified name, allocating the string of the needed length.
| [in] | parent | Pointer to the parent node |
| [in] | name | Name of the node to look for |
| [out] | str | String of the content of the node. The string str MUST be deallocated with sb_free . |
Gets the next sibling node.
| [in] | node | Pointer to current node |
Gets the previous sibling node.
| [in] | node | Pointer to current node |
Removes the node with the specified name.
| [in] | parent | Pointer to the parent node |
| [in] | name | Name of the node to remove |
Removes the current node.
| [in] | node | Pointer to the current node |
Sets the content of the node with the specified name. The function checks if the node exists and otherwise creates it. If the node exists, the value is updated.
| [in] | parent | Pointer to the parent node |
| [in] | name | Name of the node to be set |
| [in] | content | Content of the node to be set. The string must be compliant to UTF-8 format. |
| sb_t_err sb_xml_node_set_attribute | ( | SB_HANDLE | node, |
| const char *const | attribute_name, | ||
| const char *const | content | ||
| ) |
Sets the content of the attribute with the specified name.
| [in] | node | Pointer to the current node |
| [in] | attribute_name | Name of the attribute to be set. The string must be compliant to UTF-8 format. |
| [in] | content | Content of the attribute to be set. The string must be compliant to UTF-8 format. |
Sets the content of the node.
| [in] | node | Pointer to the current node. |
| [in] | content | Content of the node to be set. The string must be compliant to UTF-8 format. |