axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
axl_bool axl_node_has_invalid_chars ( const char *  content,
int  content_size,
int *  added_size 

Allows to check if the provided string have invalid chars that must be escaped by using the entity reference rather the value itself.

This function is useful in the sense it allows to know if a particular content will contain elements not allowed by the XML 1.0 definition to be placed directly (like &, <, ;, ' and ").

This function use usually complemented with axl_node_content_copy_and_escape.

contentThe content to check.
content_sizeThe size of the content to be checked. If -1 is provided, the function will calculate the content length.
added_sizeAn integer reference where the additional size variable will be added. This additional size will be the space required to replace non-valid characters with entity references. This parameter is optional, so passing a NULL value is allowed.
axl_true if the string contains non valid chars that must be escaped using entity references.

References axl_false.

Referenced by axl_node_set_attribute(), and axl_node_set_content().